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

Side by Side Diff: chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.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_ASH_BROWSER_NON_CLIENT_FRAME_VIEW_ASH_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_ASH_BROWSER_NON_CLIENT_FRAME_VIEW_ASH_H_
6 #define CHROME_BROWSER_UI_VIEWS_ASH_BROWSER_NON_CLIENT_FRAME_VIEW_ASH_H_ 6 #define CHROME_BROWSER_UI_VIEWS_ASH_BROWSER_NON_CLIENT_FRAME_VIEW_ASH_H_
7 7
8 #include "base/gtest_prod_util.h" 8 #include "base/gtest_prod_util.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/ui/search/search_types.h" 10 #include "chrome/browser/ui/search/search_types.h"
11 #include "chrome/browser/ui/search/toolbar_search_animator_observer.h" 11 #include "chrome/browser/ui/search/toolbar_search_animator_observer.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_model.h"
14 #include "ui/views/controls/button/button.h" // ButtonListener 14 #include "ui/views/controls/button/button.h" // ButtonListener
15 15
16 class TabIconView;
17
16 namespace ash { 18 namespace ash {
17 class FramePainter; 19 class FramePainter;
18 } 20 }
19 namespace views { 21 namespace views {
20 class ImageButton; 22 class ImageButton;
21 } 23 }
22 24
23 class BrowserNonClientFrameViewAsh 25 class BrowserNonClientFrameViewAsh
24 : public BrowserNonClientFrameView, 26 : public BrowserNonClientFrameView,
25 public views::ButtonListener, 27 public views::ButtonListener,
26 public TabIconView::TabIconViewModel, 28 public chrome::TabIconViewModel,
27 public chrome::search::ToolbarSearchAnimatorObserver { 29 public chrome::search::ToolbarSearchAnimatorObserver {
28 public: 30 public:
29 static const char kViewClassName[]; 31 static const char kViewClassName[];
30 32
31 BrowserNonClientFrameViewAsh(BrowserFrame* frame, BrowserView* browser_view); 33 BrowserNonClientFrameViewAsh(BrowserFrame* frame, BrowserView* browser_view);
32 virtual ~BrowserNonClientFrameViewAsh(); 34 virtual ~BrowserNonClientFrameViewAsh();
33 35
34 void Init(); 36 void Init();
35 37
36 // BrowserNonClientFrameView overrides: 38 // BrowserNonClientFrameView overrides:
(...skipping 17 matching lines...) Expand all
54 virtual void Layout() OVERRIDE; 56 virtual void Layout() OVERRIDE;
55 virtual std::string GetClassName() const OVERRIDE; 57 virtual std::string GetClassName() const OVERRIDE;
56 virtual bool HitTest(const gfx::Point& l) const OVERRIDE; 58 virtual bool HitTest(const gfx::Point& l) const OVERRIDE;
57 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; 59 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
58 virtual gfx::Size GetMinimumSize() OVERRIDE; 60 virtual gfx::Size GetMinimumSize() OVERRIDE;
59 61
60 // views::ButtonListener overrides: 62 // views::ButtonListener overrides:
61 virtual void ButtonPressed(views::Button* sender, 63 virtual void ButtonPressed(views::Button* sender,
62 const views::Event& event) OVERRIDE; 64 const views::Event& event) OVERRIDE;
63 65
64 // Overridden from TabIconView::TabIconViewModel: 66 // Overridden from chrome::TabIconViewModel:
65 virtual bool ShouldTabIconViewAnimate() const OVERRIDE; 67 virtual bool ShouldTabIconViewAnimate() const OVERRIDE;
66 virtual gfx::ImageSkia GetFaviconForTabIconView() OVERRIDE; 68 virtual gfx::ImageSkia GetFaviconForTabIconView() OVERRIDE;
67 69
68 // Overridden from chrome::search::ToolbarSearchAnimatorObserver: 70 // Overridden from chrome::search::ToolbarSearchAnimatorObserver:
69 virtual void OnToolbarBackgroundAnimatorProgressed() OVERRIDE; 71 virtual void OnToolbarBackgroundAnimatorProgressed() OVERRIDE;
70 virtual void OnToolbarBackgroundAnimatorCanceled( 72 virtual void OnToolbarBackgroundAnimatorCanceled(
71 TabContents* tab_contents) OVERRIDE; 73 TabContents* tab_contents) OVERRIDE;
72 74
73 private: 75 private:
74 FRIEND_TEST_ALL_PREFIXES(BrowserNonClientFrameViewAshTest, UseShortHeader); 76 FRIEND_TEST_ALL_PREFIXES(BrowserNonClientFrameViewAshTest, UseShortHeader);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 scoped_ptr<ash::FramePainter> frame_painter_; 109 scoped_ptr<ash::FramePainter> frame_painter_;
108 110
109 // If true the |size_button_| minimizes, otherwise it toggles between 111 // If true the |size_button_| minimizes, otherwise it toggles between
110 // maximized and restored. 112 // maximized and restored.
111 bool size_button_minimizes_; 113 bool size_button_minimizes_;
112 114
113 DISALLOW_COPY_AND_ASSIGN(BrowserNonClientFrameViewAsh); 115 DISALLOW_COPY_AND_ASSIGN(BrowserNonClientFrameViewAsh);
114 }; 116 };
115 117
116 #endif // CHROME_BROWSER_UI_VIEWS_ASH_BROWSER_NON_CLIENT_FRAME_VIEW_ASH_H_ 118 #endif // CHROME_BROWSER_UI_VIEWS_ASH_BROWSER_NON_CLIENT_FRAME_VIEW_ASH_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_browser_frame_view.cc ('k') | chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698