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

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

Issue 11742003: Implemented drop hander for the Home toolbar button that accepts (only) links (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 10 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
« no previous file with comments | « chrome/browser/ui/views/home_button.cc ('k') | chrome/browser/ui/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) 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_TOOLBAR_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_VIEW_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/observer_list.h" 12 #include "base/observer_list.h"
13 #include "base/prefs/public/pref_member.h" 13 #include "base/prefs/public/pref_member.h"
14 #include "chrome/browser/command_observer.h" 14 #include "chrome/browser/command_observer.h"
15 #include "chrome/browser/ui/toolbar/back_forward_menu_model.h" 15 #include "chrome/browser/ui/toolbar/back_forward_menu_model.h"
16 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" 16 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
17 #include "chrome/browser/ui/views/reload_button.h" 17 #include "chrome/browser/ui/views/reload_button.h"
18 #include "ui/base/accelerators/accelerator.h" 18 #include "ui/base/accelerators/accelerator.h"
19 #include "ui/base/animation/slide_animation.h" 19 #include "ui/base/animation/slide_animation.h"
20 #include "ui/views/accessible_pane_view.h" 20 #include "ui/views/accessible_pane_view.h"
21 #include "ui/views/controls/button/menu_button.h" 21 #include "ui/views/controls/button/menu_button.h"
22 #include "ui/views/controls/button/menu_button_listener.h" 22 #include "ui/views/controls/button/menu_button_listener.h"
23 #include "ui/views/view.h" 23 #include "ui/views/view.h"
24 24
25 class BrowserActionsContainer; 25 class BrowserActionsContainer;
26 class Browser; 26 class Browser;
27 class HomeImageButton;
27 class WrenchMenu; 28 class WrenchMenu;
28 class WrenchMenuModel; 29 class WrenchMenuModel;
29 30
30 namespace views { 31 namespace views {
31 class MenuListener; 32 class MenuListener;
32 } 33 }
33 34
34 // The Browser Window's toolbar. 35 // The Browser Window's toolbar.
35 class ToolbarView : public views::AccessiblePaneView, 36 class ToolbarView : public views::AccessiblePaneView,
36 public views::MenuButtonListener, 37 public views::MenuButtonListener,
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 195
195 void OnShowHomeButtonChanged(); 196 void OnShowHomeButtonChanged();
196 197
197 // The model that contains the security level, text, icon to display... 198 // The model that contains the security level, text, icon to display...
198 ToolbarModel* model_; 199 ToolbarModel* model_;
199 200
200 // Controls 201 // Controls
201 views::ImageButton* back_; 202 views::ImageButton* back_;
202 views::ImageButton* forward_; 203 views::ImageButton* forward_;
203 ReloadButton* reload_; 204 ReloadButton* reload_;
204 views::ImageButton* home_; 205 HomeImageButton* home_;
205 LocationBarView* location_bar_; 206 LocationBarView* location_bar_;
206 BrowserActionsContainer* browser_actions_; 207 BrowserActionsContainer* browser_actions_;
207 views::MenuButton* app_menu_; 208 views::MenuButton* app_menu_;
208 Browser* browser_; 209 Browser* browser_;
209 210
210 // Controls whether or not a home button should be shown on the toolbar. 211 // Controls whether or not a home button should be shown on the toolbar.
211 BooleanPrefMember show_home_button_; 212 BooleanPrefMember show_home_button_;
212 213
213 // A pref that counts how often the bubble has been shown. 214 // A pref that counts how often the bubble has been shown.
214 IntegerPrefMember sideload_wipeout_bubble_shown_; 215 IntegerPrefMember sideload_wipeout_bubble_shown_;
215 216
216 // The display mode used when laying out the toolbar. 217 // The display mode used when laying out the toolbar.
217 DisplayMode display_mode_; 218 DisplayMode display_mode_;
218 219
219 // Wrench model and menu. 220 // Wrench model and menu.
220 // Note that the menu should be destroyed before the model it uses, so the 221 // Note that the menu should be destroyed before the model it uses, so the
221 // menu should be listed later. 222 // menu should be listed later.
222 scoped_ptr<WrenchMenuModel> wrench_menu_model_; 223 scoped_ptr<WrenchMenuModel> wrench_menu_model_;
223 scoped_ptr<WrenchMenu> wrench_menu_; 224 scoped_ptr<WrenchMenu> wrench_menu_;
224 225
225 // A list of listeners to call when the menu opens. 226 // A list of listeners to call when the menu opens.
226 ObserverList<views::MenuListener> menu_listeners_; 227 ObserverList<views::MenuListener> menu_listeners_;
227 228
228 content::NotificationRegistrar registrar_; 229 content::NotificationRegistrar registrar_;
229 230
230 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView); 231 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView);
231 }; 232 };
232 233
233 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_VIEW_H_ 234 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/home_button.cc ('k') | chrome/browser/ui/views/toolbar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698