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

Side by Side Diff: chrome/browser/ui/views/frame/opaque_browser_frame_view.h

Issue 7045023: Simplify ProfileMenuButton. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 7 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_OPAQUE_BROWSER_FRAME_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/scoped_ptr.h" 9 #include "base/scoped_ptr.h"
10 #include "chrome/browser/prefs/pref_member.h" 10 #include "chrome/browser/prefs/pref_member.h"
11 #include "chrome/browser/ui/views/frame/browser_frame.h" 11 #include "chrome/browser/ui/views/frame/browser_frame.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 "views/controls/button/button.h" 14 #include "views/controls/button/button.h"
15 #include "views/controls/menu/view_menu_delegate.h"
16 #include "views/window/non_client_view.h" 15 #include "views/window/non_client_view.h"
17 16
18 class BrowserView; 17 class BrowserView;
19 namespace gfx { 18 namespace gfx {
20 class Font; 19 class Font;
21 } 20 }
22 class ProfileMenuButton; 21 class ProfileMenuButton;
23 class ProfileMenuModel; 22 class ProfileMenuModel;
24 class ProfileTagView; 23 class ProfileTagView;
25 class TabContents; 24 class TabContents;
26 namespace views { 25 namespace views {
27 class ImageButton; 26 class ImageButton;
28 class ImageView; 27 class ImageView;
29 } 28 }
30 29
31 class OpaqueBrowserFrameView : public BrowserNonClientFrameView, 30 class OpaqueBrowserFrameView : public BrowserNonClientFrameView,
32 public NotificationObserver, 31 public NotificationObserver,
33 public views::ButtonListener, 32 public views::ButtonListener,
34 public views::ViewMenuDelegate,
35 public TabIconView::TabIconViewModel { 33 public TabIconView::TabIconViewModel {
36 public: 34 public:
37 // Constructs a non-client view for an BrowserFrame. 35 // Constructs a non-client view for an BrowserFrame.
38 OpaqueBrowserFrameView(BrowserFrame* frame, BrowserView* browser_view); 36 OpaqueBrowserFrameView(BrowserFrame* frame, BrowserView* browser_view);
39 virtual ~OpaqueBrowserFrameView(); 37 virtual ~OpaqueBrowserFrameView();
40 38
41 // Overridden from BrowserNonClientFrameView: 39 // Overridden from BrowserNonClientFrameView:
42 virtual gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const OVERRIDE; 40 virtual gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const OVERRIDE;
43 virtual int GetHorizontalTabStripVerticalOffset(bool restored) const OVERRIDE; 41 virtual int GetHorizontalTabStripVerticalOffset(bool restored) const OVERRIDE;
44 virtual void UpdateThrobber(bool running) OVERRIDE; 42 virtual void UpdateThrobber(bool running) OVERRIDE;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE; 79 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE;
82 virtual gfx::Rect GetWindowBoundsForClientBounds( 80 virtual gfx::Rect GetWindowBoundsForClientBounds(
83 const gfx::Rect& client_bounds) const OVERRIDE; 81 const gfx::Rect& client_bounds) const OVERRIDE;
84 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE; 82 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE;
85 virtual void GetWindowMask(const gfx::Size& size, gfx::Path* window_mask) 83 virtual void GetWindowMask(const gfx::Size& size, gfx::Path* window_mask)
86 OVERRIDE; 84 OVERRIDE;
87 virtual void EnableClose(bool enable) OVERRIDE; 85 virtual void EnableClose(bool enable) OVERRIDE;
88 virtual void ResetWindowControls() OVERRIDE; 86 virtual void ResetWindowControls() OVERRIDE;
89 virtual void UpdateWindowIcon() OVERRIDE; 87 virtual void UpdateWindowIcon() OVERRIDE;
90 88
91 // Overridden from views::ViewMenuDelegate:
92 virtual void RunMenu(views::View* source, const gfx::Point& pt) OVERRIDE;
93
94 // Overridden from views::View: 89 // Overridden from views::View:
95 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 90 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
96 virtual void Layout() OVERRIDE; 91 virtual void Layout() OVERRIDE;
97 virtual bool HitTest(const gfx::Point& l) const OVERRIDE; 92 virtual bool HitTest(const gfx::Point& l) const OVERRIDE;
98 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; 93 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
99 94
100 // Overridden from views::ButtonListener: 95 // Overridden from views::ButtonListener:
101 virtual void ButtonPressed(views::Button* sender, const views::Event& event) 96 virtual void ButtonPressed(views::Button* sender, const views::Event& event)
102 OVERRIDE; 97 OVERRIDE;
103 98
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 // Image tag displayed on frame beneath profile_button_. 192 // Image tag displayed on frame beneath profile_button_.
198 scoped_ptr<ProfileTagView> profile_tag_; 193 scoped_ptr<ProfileTagView> profile_tag_;
199 194
200 // The Google services user name associated with this BrowserView's profile. 195 // The Google services user name associated with this BrowserView's profile.
201 StringPrefMember username_pref_; 196 StringPrefMember username_pref_;
202 197
203 DISALLOW_COPY_AND_ASSIGN(OpaqueBrowserFrameView); 198 DISALLOW_COPY_AND_ASSIGN(OpaqueBrowserFrameView);
204 }; 199 };
205 200
206 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_ 201 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/glass_browser_frame_view.cc ('k') | chrome/browser/ui/views/frame/opaque_browser_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698