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"
20 class OakDetailsModel
;
22 class OakWindow
: public views::WidgetDelegateView
,
23 public views::TreeViewController
{
28 static views::Widget
* instance
;
30 // Overridden from views::WidgetDelegateView:
31 virtual bool CanResize() const OVERRIDE
;
32 virtual bool CanMaximize() const OVERRIDE
;
33 virtual 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
;
40 // Overridden from views::View:
41 virtual void OnPaint(gfx::Canvas
* canvas
) OVERRIDE
;
42 virtual void ViewHierarchyChanged(bool is_add
,
44 views::View
* child
) OVERRIDE
;
45 virtual void Layout() OVERRIDE
;
47 // Overridden from views::TreeViewController:
48 virtual void OnTreeViewSelectionChanged(views::TreeView
* tree
) OVERRIDE
;
52 scoped_ptr
<views::TreeView
> tree_
;
53 scoped_ptr
<TreeOfWindows
> tree_model_
;
54 views::View
* tree_container_
;
56 gfx::Rect separator_rect_
;
58 scoped_ptr
<views::TableView
> details_
;
59 scoped_ptr
<OakDetailsModel
> details_model_
;
60 views::View
* details_container_
;
62 DISALLOW_COPY_AND_ASSIGN(OakWindow
);
65 } // namespace internal
68 #endif // UI_OAK_OAK_WINDOW_H_