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

Side by Side Diff: chrome/browser/ui/views/frame/app_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
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_VIEWS_FRAME_APP_PANEL_BROWSER_FRAME_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_APP_PANEL_BROWSER_FRAME_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_APP_PANEL_BROWSER_FRAME_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_APP_PANEL_BROWSER_FRAME_VIEW_H_
7 7
8 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" 8 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h"
9 #include "chrome/browser/ui/views/tab_icon_view.h" 9 #include "chrome/browser/ui/views/tab_icon_view_model.h"
10 #include "ui/views/controls/button/button.h" 10 #include "ui/views/controls/button/button.h"
11 11
12 class BrowserFrame; 12 class BrowserFrame;
13 class BrowserView; 13 class BrowserView;
14 class TabIconView;
14 15
15 namespace views { 16 namespace views {
16 class ImageButton; 17 class ImageButton;
17 } 18 }
19
18 // The frame view which is used for Application Panels. 20 // The frame view which is used for Application Panels.
19 // TODO(rafaelw): Refactor. This shares much duplicated code with 21 // TODO(rafaelw): Refactor. This shares much duplicated code with
20 // OpaqueBrowserFrameView. 22 // OpaqueBrowserFrameView.
21 class AppPanelBrowserFrameView : public BrowserNonClientFrameView, 23 class AppPanelBrowserFrameView : public BrowserNonClientFrameView,
22 public views::ButtonListener, 24 public views::ButtonListener,
23 public TabIconView::TabIconViewModel { 25 public chrome::TabIconViewModel {
24 public: 26 public:
25 // Constructs a non-client view for an BrowserFrame. 27 // Constructs a non-client view for an BrowserFrame.
26 AppPanelBrowserFrameView(BrowserFrame* frame, BrowserView* browser_view); 28 AppPanelBrowserFrameView(BrowserFrame* frame, BrowserView* browser_view);
27 virtual ~AppPanelBrowserFrameView(); 29 virtual ~AppPanelBrowserFrameView();
28 30
29 // Overridden from BrowserNonClientFrameView: 31 // Overridden from BrowserNonClientFrameView:
30 virtual gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const OVERRIDE; 32 virtual gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const OVERRIDE;
31 virtual int GetHorizontalTabStripVerticalOffset(bool restored) const OVERRIDE; 33 virtual int GetHorizontalTabStripVerticalOffset(bool restored) const OVERRIDE;
32 virtual void UpdateThrobber(bool running) OVERRIDE; 34 virtual void UpdateThrobber(bool running) OVERRIDE;
33 virtual gfx::Size GetMinimumSize() OVERRIDE; 35 virtual gfx::Size GetMinimumSize() OVERRIDE;
(...skipping 10 matching lines...) Expand all
44 virtual void UpdateWindowIcon() OVERRIDE; 46 virtual void UpdateWindowIcon() OVERRIDE;
45 47
46 // Overridden from views::View: 48 // Overridden from views::View:
47 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 49 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
48 virtual void Layout() OVERRIDE; 50 virtual void Layout() OVERRIDE;
49 51
50 // Overridden from views::ButtonListener: 52 // Overridden from views::ButtonListener:
51 virtual void ButtonPressed(views::Button* sender, const views::Event& event) 53 virtual void ButtonPressed(views::Button* sender, const views::Event& event)
52 OVERRIDE; 54 OVERRIDE;
53 55
54 // Overridden from TabIconView::TabIconViewModel: 56 // Overridden from chrome::TabIconViewModel:
55 virtual bool ShouldTabIconViewAnimate() const OVERRIDE; 57 virtual bool ShouldTabIconViewAnimate() const OVERRIDE;
56 virtual gfx::ImageSkia GetFaviconForTabIconView() OVERRIDE; 58 virtual gfx::ImageSkia GetFaviconForTabIconView() OVERRIDE;
57 59
58 private: 60 private:
59 // Returns the thickness of the border that makes up the window frame edges. 61 // Returns the thickness of the border that makes up the window frame edges.
60 // This does not include any client edge. 62 // This does not include any client edge.
61 int FrameBorderThickness() const; 63 int FrameBorderThickness() const;
62 64
63 // Returns the thickness of the entire nonclient left, right, and bottom 65 // Returns the thickness of the entire nonclient left, right, and bottom
64 // borders, including both the window frame and any client edge. 66 // borders, including both the window frame and any client edge.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 // The Window icon. 104 // The Window icon.
103 TabIconView* window_icon_; 105 TabIconView* window_icon_;
104 106
105 // The bounds of the ClientView. 107 // The bounds of the ClientView.
106 gfx::Rect client_view_bounds_; 108 gfx::Rect client_view_bounds_;
107 109
108 DISALLOW_COPY_AND_ASSIGN(AppPanelBrowserFrameView); 110 DISALLOW_COPY_AND_ASSIGN(AppPanelBrowserFrameView);
109 }; 111 };
110 112
111 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_APP_PANEL_BROWSER_FRAME_VIEW_H_ 113 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_APP_PANEL_BROWSER_FRAME_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698