Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(290)

Side by Side Diff: chrome/browser/ui/panels/panel_browser_frame_view.h

Issue 10736063: views: Extract TabIconViewModel into its own header file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/DEPS ('k') | chrome/browser/ui/panels/panel_browser_frame_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/gtest_prod_util.h" 9 #include "base/gtest_prod_util.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
11 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" 11 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h"
12 #include "chrome/browser/ui/views/tab_icon_view.h" 12 #include "chrome/browser/ui/views/tab_icon_view_model.h"
13 #include "ui/views/controls/button/button.h" 13 #include "ui/views/controls/button/button.h"
14 14
15 class PanelBrowserView; 15 class PanelBrowserView;
16 class SkPaint; 16 class SkPaint;
17 class TabIconView;
18
17 namespace gfx { 19 namespace gfx {
18 class Font; 20 class Font;
19 class ImageSkia; 21 class ImageSkia;
20 } 22 }
21 namespace ui { 23 namespace ui {
22 class LinearAnimation; 24 class LinearAnimation;
23 } 25 }
24 namespace views { 26 namespace views {
25 class ImageButton; 27 class ImageButton;
26 class Label; 28 class Label;
27 } 29 }
28 30
29 class PanelBrowserFrameView : public BrowserNonClientFrameView, 31 class PanelBrowserFrameView : public BrowserNonClientFrameView,
30 public views::ButtonListener, 32 public views::ButtonListener,
31 public TabIconView::TabIconViewModel { 33 public chrome::TabIconViewModel {
32 public: 34 public:
33 PanelBrowserFrameView(BrowserFrame* frame, PanelBrowserView* browser_view); 35 PanelBrowserFrameView(BrowserFrame* frame, PanelBrowserView* browser_view);
34 virtual ~PanelBrowserFrameView(); 36 virtual ~PanelBrowserFrameView();
35 37
36 void UpdateTitleBar(); 38 void UpdateTitleBar();
37 void UpdateTitleBarMinimizeRestoreButtonVisibility(); 39 void UpdateTitleBarMinimizeRestoreButtonVisibility();
38 40
39 // Returns the height of the entire nonclient top border, including the window 41 // Returns the height of the entire nonclient top border, including the window
40 // frame, any title area, and any connected client edge. 42 // frame, any title area, and any connected client edge.
41 int NonClientTopBorderHeight() const; 43 int NonClientTopBorderHeight() const;
(...skipping 30 matching lines...) Expand all
72 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; 74 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
73 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; 75 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE;
74 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; 76 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE;
75 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; 77 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE;
76 virtual void OnMouseCaptureLost() OVERRIDE; 78 virtual void OnMouseCaptureLost() OVERRIDE;
77 79
78 // Overridden from views::ButtonListener: 80 // Overridden from views::ButtonListener:
79 virtual void ButtonPressed(views::Button* sender, const views::Event& event) 81 virtual void ButtonPressed(views::Button* sender, const views::Event& event)
80 OVERRIDE; 82 OVERRIDE;
81 83
82 // Overridden from TabIconView::TabIconViewModel: 84 // Overridden from chrome::TabIconViewModel:
83 virtual bool ShouldTabIconViewAnimate() const OVERRIDE; 85 virtual bool ShouldTabIconViewAnimate() const OVERRIDE;
84 virtual gfx::ImageSkia GetFaviconForTabIconView() OVERRIDE; 86 virtual gfx::ImageSkia GetFaviconForTabIconView() OVERRIDE;
85 87
86 private: 88 private:
87 friend class PanelBrowserViewTest; 89 friend class PanelBrowserViewTest;
88 friend class NativePanelTestingWin; 90 friend class NativePanelTestingWin;
89 91
90 enum PaintState { 92 enum PaintState {
91 NOT_PAINTED, 93 NOT_PAINTED,
92 PAINT_AS_INACTIVE, 94 PAINT_AS_INACTIVE,
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 views::ImageButton* minimize_button_; 137 views::ImageButton* minimize_button_;
136 views::ImageButton* restore_button_; 138 views::ImageButton* restore_button_;
137 TabIconView* title_icon_; 139 TabIconView* title_icon_;
138 views::Label* title_label_; 140 views::Label* title_label_;
139 gfx::Rect client_view_bounds_; 141 gfx::Rect client_view_bounds_;
140 142
141 DISALLOW_COPY_AND_ASSIGN(PanelBrowserFrameView); 143 DISALLOW_COPY_AND_ASSIGN(PanelBrowserFrameView);
142 }; 144 };
143 145
144 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_FRAME_VIEW_H_ 146 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_FRAME_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/DEPS ('k') | chrome/browser/ui/panels/panel_browser_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698