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

Side by Side Diff: chrome/browser/views/toolbar_view.h

Issue 2781003: Clean up bits of the toolbar code.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 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 | « no previous file | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "app/menus/simple_menu_model.h" 10 #include "app/menus/simple_menu_model.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 virtual bool AcceleratorPressed(const views::Accelerator& accelerator); 134 virtual bool AcceleratorPressed(const views::Accelerator& accelerator);
135 virtual gfx::Size GetPreferredSize(); 135 virtual gfx::Size GetPreferredSize();
136 virtual void Layout(); 136 virtual void Layout();
137 virtual void Paint(gfx::Canvas* canvas); 137 virtual void Paint(gfx::Canvas* canvas);
138 virtual void ThemeChanged(); 138 virtual void ThemeChanged();
139 139
140 private: 140 private:
141 // Returns the number of pixels above the location bar in non-normal display. 141 // Returns the number of pixels above the location bar in non-normal display.
142 int PopupTopSpacing() const; 142 int PopupTopSpacing() const;
143 143
144 // Set up the various Views in the toolbar 144 // Loads the images for all the child views.
145 void CreateLeftSideControls(); 145 void LoadImages();
146 void CreateCenterStack(Profile* profile);
147 void CreateRightSideControls(Profile* profile);
148 void LoadLeftSideControlsImages();
149 void LoadCenterStackImages();
150 void LoadRightSideControlsImages();
151 146
152 // Runs various menus. 147 // Runs various menus.
153 void RunPageMenu(const gfx::Point& pt); 148 void RunPageMenu(const gfx::Point& pt);
154 void RunAppMenu(const gfx::Point& pt); 149 void RunAppMenu(const gfx::Point& pt);
155 150
156 // Check if the menu exited with a code indicating the user wants to 151 // Check if the menu exited with a code indicating the user wants to
157 // switch to the other menu, and then switch to that other menu. 152 // switch to the other menu, and then switch to that other menu.
158 void SwitchToOtherMenuIfNeeded(views::Menu2* previous_menu, 153 void SwitchToOtherMenuIfNeeded(views::Menu2* previous_menu,
159 views::MenuButton* next_menu_button); 154 views::MenuButton* next_menu_button);
160 155
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 // running. 254 // running.
260 bool* destroyed_flag_; 255 bool* destroyed_flag_;
261 256
262 // When collapsed, the toolbar is just a tiny strip, no controls are visible. 257 // When collapsed, the toolbar is just a tiny strip, no controls are visible.
263 bool collapsed_; 258 bool collapsed_;
264 259
265 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView); 260 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView);
266 }; 261 };
267 262
268 #endif // CHROME_BROWSER_VIEWS_TOOLBAR_VIEW_H_ 263 #endif // CHROME_BROWSER_VIEWS_TOOLBAR_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/views/toolbar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698