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 10494004: Implements a zoom icon in the Omnibox for Views. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "chrome/browser/extensions/extension_context_menu_model.h" 13 #include "chrome/browser/extensions/extension_context_menu_model.h"
14 #include "chrome/browser/prefs/pref_member.h" 14 #include "chrome/browser/prefs/pref_member.h"
15 #include "chrome/browser/search_engines/template_url_service_observer.h" 15 #include "chrome/browser/search_engines/template_url_service_observer.h"
16 #include "chrome/browser/ui/omnibox/location_bar.h" 16 #include "chrome/browser/ui/omnibox/location_bar.h"
17 #include "chrome/browser/ui/omnibox/omnibox_edit_controller.h" 17 #include "chrome/browser/ui/omnibox/omnibox_edit_controller.h"
18 #include "chrome/browser/ui/search/search_model_observer.h" 18 #include "chrome/browser/ui/search/search_model_observer.h"
19 #include "chrome/browser/ui/toolbar/toolbar_model.h" 19 #include "chrome/browser/ui/toolbar/toolbar_model.h"
20 #include "chrome/browser/ui/views/dropdown_bar_host.h" 20 #include "chrome/browser/ui/views/dropdown_bar_host.h"
21 #include "chrome/browser/ui/views/dropdown_bar_host_delegate.h" 21 #include "chrome/browser/ui/views/dropdown_bar_host_delegate.h"
22 #include "chrome/browser/ui/views/extensions/extension_popup.h" 22 #include "chrome/browser/ui/views/extensions/extension_popup.h"
23 #include "chrome/browser/ui/zoom/zoom_controller.h"
23 #include "content/public/browser/notification_observer.h" 24 #include "content/public/browser/notification_observer.h"
24 #include "content/public/browser/notification_registrar.h" 25 #include "content/public/browser/notification_registrar.h"
25 #include "ui/gfx/font.h" 26 #include "ui/gfx/font.h"
26 #include "ui/gfx/rect.h" 27 #include "ui/gfx/rect.h"
27 #include "ui/views/controls/native/native_view_host.h" 28 #include "ui/views/controls/native/native_view_host.h"
28 #include "ui/views/drag_controller.h" 29 #include "ui/views/drag_controller.h"
29 30
30 #if defined(USE_AURA) 31 #if defined(USE_AURA)
31 #include "ui/compositor/layer_animation_observer.h" 32 #include "ui/compositor/layer_animation_observer.h"
32 #endif 33 #endif
(...skipping 10 matching lines...) Expand all
43 class KeywordHintView; 44 class KeywordHintView;
44 class LocationIconView; 45 class LocationIconView;
45 class PageActionWithBadgeView; 46 class PageActionWithBadgeView;
46 class PageActionImageView; 47 class PageActionImageView;
47 class Profile; 48 class Profile;
48 class SelectedKeywordView; 49 class SelectedKeywordView;
49 class StarView; 50 class StarView;
50 class SuggestedTextView; 51 class SuggestedTextView;
51 class TabContents; 52 class TabContents;
52 class TemplateURLService; 53 class TemplateURLService;
54 class ZoomView;
53 55
54 namespace chrome { 56 namespace chrome {
55 namespace search { 57 namespace search {
56 class SearchModel; 58 class SearchModel;
57 } 59 }
58 } 60 }
59 61
60 namespace views { 62 namespace views {
61 class BubbleDelegateView; 63 class BubbleDelegateView;
62 class Widget; 64 class Widget;
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 // security style, and, if |tab_for_state_restoring| is non-NULL, also restore 177 // security style, and, if |tab_for_state_restoring| is non-NULL, also restore
176 // saved state that the tab holds. 178 // saved state that the tab holds.
177 void Update(const content::WebContents* tab_for_state_restoring); 179 void Update(const content::WebContents* tab_for_state_restoring);
178 180
179 // Returns corresponding profile. 181 // Returns corresponding profile.
180 Profile* profile() const { return profile_; } 182 Profile* profile() const { return profile_; }
181 183
182 // Returns the delegate. 184 // Returns the delegate.
183 Delegate* delegate() const { return delegate_; } 185 Delegate* delegate() const { return delegate_; }
184 186
187 // Sets the tooltip for the zoom icon.
188 void SetZoomIconTooltipPercent(int zoom_percent);
189
190 // Sets the zoom icon state.
191 void SetZoomIconState(ZoomController::ZoomIconState zoom_icon_state);
192
193 // Shows the zoom bubble.
194 void ShowZoomBubble(int zoom_percent);
195
185 // Sets |preview_enabled| for the PageAction View associated with this 196 // Sets |preview_enabled| for the PageAction View associated with this
186 // |page_action|. If |preview_enabled| is true, the view will display the 197 // |page_action|. If |preview_enabled| is true, the view will display the
187 // PageActions icon even though it has not been activated by the extension. 198 // PageActions icon even though it has not been activated by the extension.
188 // This is used by the ExtensionInstalledBubble to preview what the icon 199 // This is used by the ExtensionInstalledBubble to preview what the icon
189 // will look like for the user upon installation of the extension. 200 // will look like for the user upon installation of the extension.
190 void SetPreviewEnabledPageAction(ExtensionAction *page_action, 201 void SetPreviewEnabledPageAction(ExtensionAction* page_action,
191 bool preview_enabled); 202 bool preview_enabled);
192 203
193 // Retrieves the PageAction View which is associated with |page_action|. 204 // Retrieves the PageAction View which is associated with |page_action|.
194 views::View* GetPageActionView(ExtensionAction* page_action); 205 views::View* GetPageActionView(ExtensionAction* page_action);
195 206
196 // Toggles the star on or off. 207 // Toggles the star on or off.
197 void SetStarToggled(bool on); 208 void SetStarToggled(bool on);
198 209
199 // Shows the bookmark bubble. 210 // Shows the bookmark bubble.
200 void ShowStarBubble(const GURL& url, bool newly_bookmarked); 211 void ShowStarBubble(const GURL& url, bool newly_bookmarked);
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 // View responsible for showing suggested text. This is NULL when there is no 501 // View responsible for showing suggested text. This is NULL when there is no
491 // suggested text. 502 // suggested text.
492 SuggestedTextView* suggested_text_view_; 503 SuggestedTextView* suggested_text_view_;
493 504
494 // Shown if the selected url has a corresponding keyword. 505 // Shown if the selected url has a corresponding keyword.
495 KeywordHintView* keyword_hint_view_; 506 KeywordHintView* keyword_hint_view_;
496 507
497 // The content setting views. 508 // The content setting views.
498 ContentSettingViews content_setting_views_; 509 ContentSettingViews content_setting_views_;
499 510
511 // The zoom icon.
512 ZoomView* zoom_view_;
513
500 // The current page actions. 514 // The current page actions.
501 std::vector<ExtensionAction*> page_actions_; 515 std::vector<ExtensionAction*> page_actions_;
502 516
503 // The page action icon views. 517 // The page action icon views.
504 PageActionViews page_action_views_; 518 PageActionViews page_action_views_;
505 519
506 // The star. 520 // The star.
507 StarView* star_view_; 521 StarView* star_view_;
508 522
509 // The action box button (plus). 523 // The action box button (plus).
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 555
542 #if defined(USE_AURA) 556 #if defined(USE_AURA)
543 // Observer for a fade-in animation. 557 // Observer for a fade-in animation.
544 scoped_ptr<FadeAnimationObserver> fade_animation_observer_; 558 scoped_ptr<FadeAnimationObserver> fade_animation_observer_;
545 #endif 559 #endif
546 560
547 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); 561 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView);
548 }; 562 };
549 563
550 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ 564 #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