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

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

Issue 10831372: Revert 152080 - Refactor browser window zoom handling and enable zoom icon on all platforms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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
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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "chrome/browser/extensions/extension_context_menu_model.h" 12 #include "chrome/browser/extensions/extension_context_menu_model.h"
13 #include "chrome/browser/prefs/pref_member.h" 13 #include "chrome/browser/prefs/pref_member.h"
14 #include "chrome/browser/search_engines/template_url_service_observer.h" 14 #include "chrome/browser/search_engines/template_url_service_observer.h"
15 #include "chrome/browser/ui/omnibox/location_bar.h" 15 #include "chrome/browser/ui/omnibox/location_bar.h"
16 #include "chrome/browser/ui/omnibox/omnibox_edit_controller.h" 16 #include "chrome/browser/ui/omnibox/omnibox_edit_controller.h"
17 #include "chrome/browser/ui/search/search_model_observer.h" 17 #include "chrome/browser/ui/search/search_model_observer.h"
18 #include "chrome/browser/ui/toolbar/toolbar_model.h" 18 #include "chrome/browser/ui/toolbar/toolbar_model.h"
19 #include "chrome/browser/ui/views/dropdown_bar_host.h" 19 #include "chrome/browser/ui/views/dropdown_bar_host.h"
20 #include "chrome/browser/ui/views/dropdown_bar_host_delegate.h" 20 #include "chrome/browser/ui/views/dropdown_bar_host_delegate.h"
21 #include "chrome/browser/ui/views/extensions/extension_popup.h" 21 #include "chrome/browser/ui/views/extensions/extension_popup.h"
22 #include "chrome/browser/ui/zoom/zoom_controller.h"
22 #include "content/public/browser/notification_observer.h" 23 #include "content/public/browser/notification_observer.h"
23 #include "content/public/browser/notification_registrar.h" 24 #include "content/public/browser/notification_registrar.h"
24 #include "ui/gfx/font.h" 25 #include "ui/gfx/font.h"
25 #include "ui/gfx/rect.h" 26 #include "ui/gfx/rect.h"
26 #include "ui/views/controls/native/native_view_host.h" 27 #include "ui/views/controls/native/native_view_host.h"
27 #include "ui/views/drag_controller.h" 28 #include "ui/views/drag_controller.h"
28 29
29 #if defined(USE_AURA) 30 #if defined(USE_AURA)
30 #include "ui/compositor/layer_animation_observer.h" 31 #include "ui/compositor/layer_animation_observer.h"
31 #endif 32 #endif
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 // security style, and, if |tab_for_state_restoring| is non-NULL, also restore 178 // security style, and, if |tab_for_state_restoring| is non-NULL, also restore
178 // saved state that the tab holds. 179 // saved state that the tab holds.
179 void Update(const content::WebContents* tab_for_state_restoring); 180 void Update(const content::WebContents* tab_for_state_restoring);
180 181
181 // Returns corresponding profile. 182 // Returns corresponding profile.
182 Profile* profile() const { return profile_; } 183 Profile* profile() const { return profile_; }
183 184
184 // Returns the delegate. 185 // Returns the delegate.
185 Delegate* delegate() const { return delegate_; } 186 Delegate* delegate() const { return delegate_; }
186 187
187 // See comment in browser_window.h for more info. 188 // Sets the tooltip for the zoom icon.
188 void ZoomChangedForActiveTab(bool can_show_bubble); 189 void SetZoomIconTooltipPercent(int zoom_percent);
190
191 // Sets the zoom icon state.
192 void SetZoomIconState(ZoomController::ZoomIconState zoom_icon_state);
193
194 // Shows the zoom bubble.
195 void ShowZoomBubble(int zoom_percent);
189 196
190 // Sets |preview_enabled| for the PageAction View associated with this 197 // Sets |preview_enabled| for the PageAction View associated with this
191 // |page_action|. If |preview_enabled| is true, the view will display the 198 // |page_action|. If |preview_enabled| is true, the view will display the
192 // PageActions icon even though it has not been activated by the extension. 199 // PageActions icon even though it has not been activated by the extension.
193 // This is used by the ExtensionInstalledBubble to preview what the icon 200 // This is used by the ExtensionInstalledBubble to preview what the icon
194 // will look like for the user upon installation of the extension. 201 // will look like for the user upon installation of the extension.
195 void SetPreviewEnabledPageAction(ExtensionAction* page_action, 202 void SetPreviewEnabledPageAction(ExtensionAction* page_action,
196 bool preview_enabled); 203 bool preview_enabled);
197 204
198 // Retrieves the PageAction View which is associated with |page_action|. 205 // Retrieves the PageAction View which is associated with |page_action|.
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 // actually blocked on the current page. 412 // actually blocked on the current page.
406 void RefreshContentSettingViews(); 413 void RefreshContentSettingViews();
407 414
408 // Delete all page action views that we have created. 415 // Delete all page action views that we have created.
409 void DeletePageActionViews(); 416 void DeletePageActionViews();
410 417
411 // Update the views for the Page Actions, to reflect state changes for 418 // Update the views for the Page Actions, to reflect state changes for
412 // PageActions. 419 // PageActions.
413 void RefreshPageActionViews(); 420 void RefreshPageActionViews();
414 421
415 // Update the view for the zoom icon based on the current tab's zoom.
416 void RefreshZoomView();
417
418 // Sets the visibility of view to new_vis. 422 // Sets the visibility of view to new_vis.
419 void ToggleVisibility(bool new_vis, views::View* view); 423 void ToggleVisibility(bool new_vis, views::View* view);
420 424
421 #if !defined(USE_AURA) 425 #if !defined(USE_AURA)
422 // Helper for the Mouse event handlers that does all the real work. 426 // Helper for the Mouse event handlers that does all the real work.
423 void OnMouseEvent(const ui::MouseEvent& event, UINT msg); 427 void OnMouseEvent(const ui::MouseEvent& event, UINT msg);
424 #endif 428 #endif
425 429
426 // Returns true if the suggest text is valid. 430 // Returns true if the suggest text is valid.
427 bool HasValidSuggestText() const; 431 bool HasValidSuggestText() const;
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 563
560 #if defined(USE_AURA) 564 #if defined(USE_AURA)
561 // Observer for a fade-in animation. 565 // Observer for a fade-in animation.
562 scoped_ptr<FadeAnimationObserver> fade_animation_observer_; 566 scoped_ptr<FadeAnimationObserver> fade_animation_observer_;
563 #endif 567 #endif
564 568
565 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); 569 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView);
566 }; 570 };
567 571
568 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ 572 #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