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/views/toolbar_view.h

Issue 14601: Some cleanup in view menu delegate (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 12 years 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/views/tabs/tab.cc ('k') | chrome/browser/views/toolbar_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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_VIEWS_TOOLBAR_VIEW_H__ 5 #ifndef CHROME_BROWSER_VIEWS_TOOLBAR_VIEW_H__
6 #define CHROME_BROWSER_VIEWS_TOOLBAR_VIEW_H__ 6 #define CHROME_BROWSER_VIEWS_TOOLBAR_VIEW_H__
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/ref_counted.h" 10 #include "base/ref_counted.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 virtual bool OnKeyReleased(const views::KeyEvent& e); 56 virtual bool OnKeyReleased(const views::KeyEvent& e);
57 virtual gfx::Size GetPreferredSize(); 57 virtual gfx::Size GetPreferredSize();
58 58
59 // Overridden from EncodingMenuControllerDelegate: 59 // Overridden from EncodingMenuControllerDelegate:
60 virtual bool IsItemChecked(int id) const; 60 virtual bool IsItemChecked(int id) const;
61 61
62 // Overridden from Menu::BaseControllerDelegate: 62 // Overridden from Menu::BaseControllerDelegate:
63 virtual bool GetAcceleratorInfo(int id, views::Accelerator* accel); 63 virtual bool GetAcceleratorInfo(int id, views::Accelerator* accel);
64 64
65 // views::MenuDelegate 65 // views::MenuDelegate
66 virtual void RunMenu(views::View* source, const CPoint& pt, HWND hwnd); 66 virtual void RunMenu(views::View* source, const gfx::Point& pt, HWND hwnd);
67 67
68 // GetProfilesHelper::Delegate method. 68 // GetProfilesHelper::Delegate method.
69 virtual void OnGetProfilesDone(const std::vector<std::wstring>& profiles); 69 virtual void OnGetProfilesDone(const std::vector<std::wstring>& profiles);
70 70
71 // Sets the profile which is active on the currently-active tab. 71 // Sets the profile which is active on the currently-active tab.
72 void SetProfile(Profile* profile); 72 void SetProfile(Profile* profile);
73 Profile* profile() { return profile_; } 73 Profile* profile() { return profile_; }
74 74
75 ToolbarStarToggle* star_button() { return star_; } 75 ToolbarStarToggle* star_button() { return star_; }
76 76
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // Set up the various Views in the toolbar 129 // Set up the various Views in the toolbar
130 void CreateLeftSideControls(); 130 void CreateLeftSideControls();
131 void CreateCenterStack(Profile* profile); 131 void CreateCenterStack(Profile* profile);
132 void CreateRightSideControls(Profile* profile); 132 void CreateRightSideControls(Profile* profile);
133 133
134 // Updates the controls to display the security appropriately (highlighted if 134 // Updates the controls to display the security appropriately (highlighted if
135 // secure). 135 // secure).
136 void SetSecurityLevel(ToolbarModel::SecurityLevel security_level); 136 void SetSecurityLevel(ToolbarModel::SecurityLevel security_level);
137 137
138 // Show the page menu. 138 // Show the page menu.
139 void RunPageMenu(const CPoint& pt, HWND hwnd); 139 void RunPageMenu(const gfx::Point& pt, HWND hwnd);
140 140
141 // Show the app menu. 141 // Show the app menu.
142 void RunAppMenu(const CPoint& pt, HWND hwnd); 142 void RunAppMenu(const gfx::Point& pt, HWND hwnd);
143 143
144 // Overridden from View, to pass keyboard triggering of the right-click 144 // Overridden from View, to pass keyboard triggering of the right-click
145 // context menu on to the toolbar child view that currently has the 145 // context menu on to the toolbar child view that currently has the
146 // accessibility focus. 146 // accessibility focus.
147 virtual void ShowContextMenu(int x, int y, bool is_mouse_gesture); 147 virtual void ShowContextMenu(int x, int y, bool is_mouse_gesture);
148 148
149 // Types of display mode this toolbar can have. 149 // Types of display mode this toolbar can have.
150 enum DisplayMode { 150 enum DisplayMode {
151 DISPLAYMODE_NORMAL, 151 DISPLAYMODE_NORMAL,
152 DISPLAYMODE_LOCATION 152 DISPLAYMODE_LOCATION
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 scoped_refptr<GetProfilesHelper> profiles_helper_; 193 scoped_refptr<GetProfilesHelper> profiles_helper_;
194 194
195 // Controls whether or not a home button should be shown on the toolbar. 195 // Controls whether or not a home button should be shown on the toolbar.
196 BooleanPrefMember show_home_button_; 196 BooleanPrefMember show_home_button_;
197 197
198 // The display mode used when laying out the toolbar. 198 // The display mode used when laying out the toolbar.
199 DisplayMode display_mode_; 199 DisplayMode display_mode_;
200 }; 200 };
201 201
202 #endif // CHROME_BROWSER_VIEWS_TOOLBAR_VIEW_H__ 202 #endif // CHROME_BROWSER_VIEWS_TOOLBAR_VIEW_H__
OLDNEW
« no previous file with comments | « chrome/browser/views/tabs/tab.cc ('k') | chrome/browser/views/toolbar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698