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

Side by Side Diff: chrome/browser/ui/views/location_bar/location_bar_view.h

Issue 2792103005: Make keyword hint view ("press tab to search foo.com") clickable. (Closed)
Patch Set: elaborate on comment Created 3 years, 8 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
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_LOCATION_BAR_LOCATION_BAR_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "chrome/browser/extensions/extension_context_menu_model.h" 15 #include "chrome/browser/extensions/extension_context_menu_model.h"
16 #include "chrome/browser/ui/location_bar/location_bar.h" 16 #include "chrome/browser/ui/location_bar/location_bar.h"
17 #include "chrome/browser/ui/omnibox/chrome_omnibox_edit_controller.h" 17 #include "chrome/browser/ui/omnibox/chrome_omnibox_edit_controller.h"
18 #include "chrome/browser/ui/views/dropdown_bar_host.h" 18 #include "chrome/browser/ui/views/dropdown_bar_host.h"
19 #include "chrome/browser/ui/views/dropdown_bar_host_delegate.h" 19 #include "chrome/browser/ui/views/dropdown_bar_host_delegate.h"
20 #include "chrome/browser/ui/views/extensions/extension_popup.h" 20 #include "chrome/browser/ui/views/extensions/extension_popup.h"
21 #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h" 21 #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h"
22 #include "components/prefs/pref_member.h" 22 #include "components/prefs/pref_member.h"
23 #include "components/search_engines/template_url_service_observer.h" 23 #include "components/search_engines/template_url_service_observer.h"
24 #include "components/security_state/core/security_state.h" 24 #include "components/security_state/core/security_state.h"
25 #include "components/zoom/zoom_event_manager_observer.h" 25 #include "components/zoom/zoom_event_manager_observer.h"
26 #include "ui/gfx/animation/animation_delegate.h" 26 #include "ui/gfx/animation/animation_delegate.h"
27 #include "ui/gfx/animation/slide_animation.h" 27 #include "ui/gfx/animation/slide_animation.h"
28 #include "ui/gfx/font.h" 28 #include "ui/gfx/font.h"
29 #include "ui/gfx/geometry/rect.h" 29 #include "ui/gfx/geometry/rect.h"
30 #include "ui/views/controls/button/button.h"
30 #include "ui/views/drag_controller.h" 31 #include "ui/views/drag_controller.h"
31 32
32 class CommandUpdater; 33 class CommandUpdater;
33 class ContentSettingBubbleModelDelegate; 34 class ContentSettingBubbleModelDelegate;
34 class ContentSettingImageView; 35 class ContentSettingImageView;
35 class GURL; 36 class GURL;
36 class KeywordHintView; 37 class KeywordHintView;
37 class LocationIconView; 38 class LocationIconView;
38 class ManagePasswordsIconViews; 39 class ManagePasswordsIconViews;
39 class Profile; 40 class Profile;
(...skipping 20 matching lines...) Expand all
60 // 61 //
61 ///////////////////////////////////////////////////////////////////////////// 62 /////////////////////////////////////////////////////////////////////////////
62 class LocationBarView : public LocationBar, 63 class LocationBarView : public LocationBar,
63 public LocationBarTesting, 64 public LocationBarTesting,
64 public views::View, 65 public views::View,
65 public views::DragController, 66 public views::DragController,
66 public gfx::AnimationDelegate, 67 public gfx::AnimationDelegate,
67 public ChromeOmniboxEditController, 68 public ChromeOmniboxEditController,
68 public DropdownBarHostDelegate, 69 public DropdownBarHostDelegate,
69 public TemplateURLServiceObserver, 70 public TemplateURLServiceObserver,
70 public zoom::ZoomEventManagerObserver { 71 public zoom::ZoomEventManagerObserver,
72 public views::ButtonListener {
71 public: 73 public:
72 class Delegate { 74 class Delegate {
73 public: 75 public:
74 // Should return the current web contents. 76 // Should return the current web contents.
75 virtual content::WebContents* GetWebContents() = 0; 77 virtual content::WebContents* GetWebContents() = 0;
76 78
77 virtual ToolbarModel* GetToolbarModel() = 0; 79 virtual ToolbarModel* GetToolbarModel() = 0;
78 virtual const ToolbarModel* GetToolbarModel() const = 0; 80 virtual const ToolbarModel* GetToolbarModel() const = 0;
79 81
80 // Returns ContentSettingBubbleModelDelegate. 82 // Returns ContentSettingBubbleModelDelegate.
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 231
230 // ChromeOmniboxEditController: 232 // ChromeOmniboxEditController:
231 void UpdateWithoutTabRestore() override; 233 void UpdateWithoutTabRestore() override;
232 ToolbarModel* GetToolbarModel() override; 234 ToolbarModel* GetToolbarModel() override;
233 content::WebContents* GetWebContents() override; 235 content::WebContents* GetWebContents() override;
234 236
235 // ZoomEventManagerObserver: 237 // ZoomEventManagerObserver:
236 // Updates the view for the zoom icon when default zoom levels change. 238 // Updates the view for the zoom icon when default zoom levels change.
237 void OnDefaultZoomLevelChanged() override; 239 void OnDefaultZoomLevelChanged() override;
238 240
241 // views::ButtonListener:
242 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
243
239 private: 244 private:
240 using ContentSettingViews = std::vector<ContentSettingImageView*>; 245 using ContentSettingViews = std::vector<ContentSettingImageView*>;
241 246
242 // Helper for GetMinimumWidth(). Calculates the incremental minimum width 247 // Helper for GetMinimumWidth(). Calculates the incremental minimum width
243 // |view| should add to the trailing width after the omnibox. 248 // |view| should add to the trailing width after the omnibox.
244 int IncrementalMinimumWidth(views::View* view) const; 249 int IncrementalMinimumWidth(views::View* view) const;
245 250
246 // The border color, drawn on top of the toolbar. 251 // The border color, drawn on top of the toolbar.
247 SkColor GetBorderColor() const; 252 SkColor GetBorderColor() const;
248 253
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 // Add/RemoveObserver calls. 425 // Add/RemoveObserver calls.
421 TemplateURLService* template_url_service_; 426 TemplateURLService* template_url_service_;
422 427
423 // Tracks this preference to determine whether bookmark editing is allowed. 428 // Tracks this preference to determine whether bookmark editing is allowed.
424 BooleanPrefMember edit_bookmarks_enabled_; 429 BooleanPrefMember edit_bookmarks_enabled_;
425 430
426 DISALLOW_COPY_AND_ASSIGN(LocationBarView); 431 DISALLOW_COPY_AND_ASSIGN(LocationBarView);
427 }; 432 };
428 433
429 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ 434 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/keyword_hint_view.cc ('k') | chrome/browser/ui/views/location_bar/location_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698