Remove LOG(ERROR)
[chromium-blink-merge.git] / ui / oak / oak_window.h
blob087334e22262587320336d8d0145e88af13f4111
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef UI_OAK_OAK_WINDOW_H_
6 #define UI_OAK_OAK_WINDOW_H_
8 #include "ui/oak/oak_tree_model.h"
9 #include "ui/views/controls/tree/tree_view_controller.h"
10 #include "ui/views/widget/widget_delegate.h"
12 namespace views {
13 class TableView;
16 namespace oak {
17 namespace internal {
19 class OakTreeModel;
20 class OakDetailsModel;
22 class OakWindow : public views::WidgetDelegateView,
23 public views::TreeViewController {
24 public:
25 OakWindow();
26 virtual ~OakWindow();
28 static views::Widget* instance;
30 // Overridden from views::WidgetDelegateView:
31 virtual bool CanResize() const OVERRIDE;
32 virtual bool CanMaximize() const OVERRIDE;
33 virtual base::string16 GetWindowTitle() const OVERRIDE;
34 virtual views::View* GetContentsView() OVERRIDE;
35 virtual gfx::ImageSkia GetWindowIcon() OVERRIDE;
36 virtual bool ShouldShowWindowIcon() const OVERRIDE;
37 virtual void DeleteDelegate() OVERRIDE;
39 private:
40 // Overridden from views::View:
41 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
42 virtual void ViewHierarchyChanged(
43 const ViewHierarchyChangedDetails& details) OVERRIDE;
44 virtual void Layout() OVERRIDE;
46 // Overridden from views::TreeViewController:
47 virtual void OnTreeViewSelectionChanged(views::TreeView* tree) OVERRIDE;
49 void Init();
51 scoped_ptr<views::TreeView> tree_;
52 scoped_ptr<TreeOfWindows> tree_model_;
53 views::View* tree_container_;
55 gfx::Rect separator_rect_;
57 scoped_ptr<views::TableView> details_;
58 scoped_ptr<OakDetailsModel> details_model_;
59 views::View* details_container_;
61 DISALLOW_COPY_AND_ASSIGN(OakWindow);
64 } // namespace internal
65 } // namespace oak
67 #endif // UI_OAK_OAK_WINDOW_H_