OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_FRAME_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_FRAME_VIEW_H_ |
6 #define CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_FRAME_VIEW_H_ | 6 #define CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_FRAME_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/gtest_prod_util.h" | 9 #include "base/gtest_prod_util.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
12 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" | 12 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" |
13 #include "chrome/browser/ui/views/tab_icon_view.h" | 13 #include "chrome/browser/ui/views/tab_icon_view.h" |
14 #include "ui/base/animation/animation_delegate.h" | 14 #include "ui/base/animation/animation_delegate.h" |
15 #include "ui/views/controls/button/button.h" | 15 #include "ui/views/controls/button/button.h" |
16 #include "ui/views/controls/button/menu_button_delegate.h" | 16 #include "ui/views/controls/button/menu_button_listener.h" |
17 | 17 |
18 class Extension; | 18 class Extension; |
19 class PanelBrowserView; | 19 class PanelBrowserView; |
20 class PanelSettingsMenuModel; | 20 class PanelSettingsMenuModel; |
21 class SkPaint; | 21 class SkPaint; |
22 namespace gfx { | 22 namespace gfx { |
23 class Font; | 23 class Font; |
24 } | 24 } |
25 namespace ui { | 25 namespace ui { |
26 class LinearAnimation; | 26 class LinearAnimation; |
27 } | 27 } |
28 namespace views { | 28 namespace views { |
29 class ImageButton; | 29 class ImageButton; |
30 class Label; | 30 class Label; |
31 class MenuButton; | 31 class MenuButton; |
32 class MenuItemView; | 32 class MenuItemView; |
33 class MenuModelAdapter; | 33 class MenuModelAdapter; |
34 class MenuRunner; | 34 class MenuRunner; |
35 } | 35 } |
36 | 36 |
37 class PanelBrowserFrameView : public BrowserNonClientFrameView, | 37 class PanelBrowserFrameView : public BrowserNonClientFrameView, |
38 public views::ButtonListener, | 38 public views::ButtonListener, |
39 public views::MenuButtonDelegate, | 39 public views::MenuButtonListener, |
40 public TabIconView::TabIconViewModel, | 40 public TabIconView::TabIconViewModel, |
41 public ui::AnimationDelegate { | 41 public ui::AnimationDelegate { |
42 public: | 42 public: |
43 PanelBrowserFrameView(BrowserFrame* frame, PanelBrowserView* browser_view); | 43 PanelBrowserFrameView(BrowserFrame* frame, PanelBrowserView* browser_view); |
44 virtual ~PanelBrowserFrameView(); | 44 virtual ~PanelBrowserFrameView(); |
45 | 45 |
46 void UpdateTitleBar(); | 46 void UpdateTitleBar(); |
47 void OnFocusChanged(bool focused); | 47 void OnFocusChanged(bool focused); |
48 | 48 |
49 // Returns the height of the entire nonclient top border, including the window | 49 // Returns the height of the entire nonclient top border, including the window |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 82 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
83 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; | 83 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; |
84 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; | 84 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; |
85 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; | 85 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; |
86 virtual void OnMouseCaptureLost() OVERRIDE; | 86 virtual void OnMouseCaptureLost() OVERRIDE; |
87 | 87 |
88 // Overridden from views::ButtonListener: | 88 // Overridden from views::ButtonListener: |
89 virtual void ButtonPressed(views::Button* sender, const views::Event& event) | 89 virtual void ButtonPressed(views::Button* sender, const views::Event& event) |
90 OVERRIDE; | 90 OVERRIDE; |
91 | 91 |
92 // Overridden from views::MenuButtonDelegate: | 92 // Overridden from views::MenuButtonListener: |
93 virtual void RunMenu(View* source, const gfx::Point& pt) OVERRIDE; | 93 virtual void OnMenuButtonClicked(views::View* source, |
| 94 const gfx::Point& point) OVERRIDE; |
94 | 95 |
95 // Overridden from TabIconView::TabIconViewModel: | 96 // Overridden from TabIconView::TabIconViewModel: |
96 virtual bool ShouldTabIconViewAnimate() const OVERRIDE; | 97 virtual bool ShouldTabIconViewAnimate() const OVERRIDE; |
97 virtual SkBitmap GetFaviconForTabIconView() OVERRIDE; | 98 virtual SkBitmap GetFaviconForTabIconView() OVERRIDE; |
98 | 99 |
99 // Overridden from AnimationDelegate: | 100 // Overridden from AnimationDelegate: |
100 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; | 101 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; |
101 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; | 102 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; |
102 virtual void AnimationCanceled(const ui::Animation* animation) OVERRIDE; | 103 virtual void AnimationCanceled(const ui::Animation* animation) OVERRIDE; |
103 | 104 |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 bool is_settings_button_visible_; | 207 bool is_settings_button_visible_; |
207 | 208 |
208 // On Aura popups are displayed in panels. If this panel is not opened by an | 209 // On Aura popups are displayed in panels. If this panel is not opened by an |
209 // app, it won't have a settings button. | 210 // app, it won't have a settings button. |
210 const bool has_settings_button_; | 211 const bool has_settings_button_; |
211 | 212 |
212 DISALLOW_COPY_AND_ASSIGN(PanelBrowserFrameView); | 213 DISALLOW_COPY_AND_ASSIGN(PanelBrowserFrameView); |
213 }; | 214 }; |
214 | 215 |
215 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_FRAME_VIEW_H_ | 216 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_FRAME_VIEW_H_ |
OLD | NEW |