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

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

Issue 1813043002: Move the hiding of Views location bar bubbles into LocationBarView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move bubble hiding into LocationBarView Created 4 years, 9 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/tabs/tab_strip_model_observer.h"
18 #include "chrome/browser/ui/views/dropdown_bar_host.h" 19 #include "chrome/browser/ui/views/dropdown_bar_host.h"
19 #include "chrome/browser/ui/views/dropdown_bar_host_delegate.h" 20 #include "chrome/browser/ui/views/dropdown_bar_host_delegate.h"
20 #include "chrome/browser/ui/views/extensions/extension_popup.h" 21 #include "chrome/browser/ui/views/extensions/extension_popup.h"
21 #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h" 22 #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h"
22 #include "components/prefs/pref_member.h" 23 #include "components/prefs/pref_member.h"
23 #include "components/search_engines/template_url_service_observer.h" 24 #include "components/search_engines/template_url_service_observer.h"
24 #include "components/security_state/security_state_model.h" 25 #include "components/security_state/security_state_model.h"
25 #include "components/ui/zoom/zoom_event_manager_observer.h" 26 #include "components/ui/zoom/zoom_event_manager_observer.h"
26 #include "ui/gfx/animation/animation_delegate.h" 27 #include "ui/gfx/animation/animation_delegate.h"
27 #include "ui/gfx/animation/slide_animation.h" 28 #include "ui/gfx/animation/slide_animation.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // of the URL bar strip and contains its content. 68 // of the URL bar strip and contains its content.
68 // 69 //
69 ///////////////////////////////////////////////////////////////////////////// 70 /////////////////////////////////////////////////////////////////////////////
70 class LocationBarView : public LocationBar, 71 class LocationBarView : public LocationBar,
71 public LocationBarTesting, 72 public LocationBarTesting,
72 public views::View, 73 public views::View,
73 public views::DragController, 74 public views::DragController,
74 public gfx::AnimationDelegate, 75 public gfx::AnimationDelegate,
75 public ChromeOmniboxEditController, 76 public ChromeOmniboxEditController,
76 public DropdownBarHostDelegate, 77 public DropdownBarHostDelegate,
78 public TabStripModelObserver,
77 public TemplateURLServiceObserver, 79 public TemplateURLServiceObserver,
78 public ui_zoom::ZoomEventManagerObserver { 80 public ui_zoom::ZoomEventManagerObserver {
79 public: 81 public:
80 class Delegate { 82 class Delegate {
81 public: 83 public:
82 // Should return the current web contents. 84 // Should return the current web contents.
83 virtual content::WebContents* GetWebContents() = 0; 85 virtual content::WebContents* GetWebContents() = 0;
84 86
85 virtual ToolbarModel* GetToolbarModel() = 0; 87 virtual ToolbarModel* GetToolbarModel() = 0;
86 virtual const ToolbarModel* GetToolbarModel() const = 0; 88 virtual const ToolbarModel* GetToolbarModel() const = 0;
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 gfx::Size GetPreferredSize() const override; 251 gfx::Size GetPreferredSize() const override;
250 void Layout() override; 252 void Layout() override;
251 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; 253 void OnNativeThemeChanged(const ui::NativeTheme* theme) override;
252 254
253 // ChromeOmniboxEditController: 255 // ChromeOmniboxEditController:
254 void UpdateWithoutTabRestore() override; 256 void UpdateWithoutTabRestore() override;
255 void ShowURL() override; 257 void ShowURL() override;
256 ToolbarModel* GetToolbarModel() override; 258 ToolbarModel* GetToolbarModel() override;
257 content::WebContents* GetWebContents() override; 259 content::WebContents* GetWebContents() override;
258 260
261 // TabStripModelObserver:
262 void TabDetachedAt(content::WebContents* contents, int index) override;
263 void TabDeactivated(content::WebContents* contents) override;
264 void ActiveTabChanged(content::WebContents* old_contents,
265 content::WebContents* new_contents,
266 int index,
267 int reason) override;
268
259 // ZoomEventManagerObserver: 269 // ZoomEventManagerObserver:
260 // Updates the view for the zoom icon when default zoom levels change. 270 // Updates the view for the zoom icon when default zoom levels change.
261 void OnDefaultZoomLevelChanged() override; 271 void OnDefaultZoomLevelChanged() override;
262 272
263 private: 273 private:
264 typedef std::vector<ContentSettingImageView*> ContentSettingViews; 274 typedef std::vector<ContentSettingImageView*> ContentSettingViews;
265 275
266 friend class PageActionImageView; 276 friend class PageActionImageView;
267 friend class PageActionWithBadgeView; 277 friend class PageActionWithBadgeView;
268 typedef std::vector<ExtensionAction*> PageActions; 278 typedef std::vector<ExtensionAction*> PageActions;
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 BooleanPrefMember edit_bookmarks_enabled_; 484 BooleanPrefMember edit_bookmarks_enabled_;
475 485
476 // This is a debug state variable that stores if the WebContents was null 486 // This is a debug state variable that stores if the WebContents was null
477 // during the last RefreshPageAction. 487 // during the last RefreshPageAction.
478 bool web_contents_null_at_last_refresh_; 488 bool web_contents_null_at_last_refresh_;
479 489
480 DISALLOW_COPY_AND_ASSIGN(LocationBarView); 490 DISALLOW_COPY_AND_ASSIGN(LocationBarView);
481 }; 491 };
482 492
483 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ 493 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_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