OLD | NEW |
---|---|
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/autocomplete/autocomplete_edit.h" | 13 #include "chrome/browser/autocomplete/autocomplete_edit.h" |
14 #include "chrome/browser/extensions/extension_context_menu_model.h" | 14 #include "chrome/browser/extensions/extension_context_menu_model.h" |
15 #include "chrome/browser/prefs/pref_member.h" | 15 #include "chrome/browser/prefs/pref_member.h" |
16 #include "chrome/browser/search_engines/template_url_service_observer.h" | 16 #include "chrome/browser/search_engines/template_url_service_observer.h" |
17 #include "chrome/browser/ui/omnibox/location_bar.h" | 17 #include "chrome/browser/ui/omnibox/location_bar.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 "chrome/browser/ui/views/omnibox/omnibox_view_views.h" | 31 #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h" |
31 #elif defined(OS_WIN) | 32 #elif defined(OS_WIN) |
32 #include "chrome/browser/ui/views/omnibox/omnibox_view_win.h" | 33 #include "chrome/browser/ui/views/omnibox/omnibox_view_win.h" |
33 #endif | 34 #endif |
34 | 35 |
35 class ActionBoxButtonView; | 36 class ActionBoxButtonView; |
36 class ChromeToMobileView; | 37 class ChromeToMobileView; |
37 class CommandUpdater; | 38 class CommandUpdater; |
38 class ContentSettingBubbleModelDelegate; | 39 class ContentSettingBubbleModelDelegate; |
39 class ContentSettingImageView; | 40 class ContentSettingImageView; |
40 class EVBubbleView; | 41 class EVBubbleView; |
41 class ExtensionAction; | 42 class ExtensionAction; |
42 class GURL; | 43 class GURL; |
43 class InstantController; | 44 class InstantController; |
44 class KeywordHintView; | 45 class KeywordHintView; |
45 class LocationIconView; | 46 class LocationIconView; |
46 class PageActionWithBadgeView; | 47 class PageActionWithBadgeView; |
47 class PageActionImageView; | 48 class PageActionImageView; |
48 class Profile; | 49 class Profile; |
49 class SelectedKeywordView; | 50 class SelectedKeywordView; |
50 class StarView; | 51 class StarView; |
52 class ZoomView; | |
Peter Kasting
2012/06/22 20:16:20
Nit: This should be at the end of the list (alphab
Kyle Horimoto
2012/06/26 21:55:53
Done.
| |
51 class TabContents; | 53 class TabContents; |
52 typedef TabContents TabContentsWrapper; | 54 typedef TabContents TabContentsWrapper; |
53 class TemplateURLService; | 55 class TemplateURLService; |
54 | 56 |
55 namespace views { | 57 namespace views { |
56 class BubbleDelegateView; | 58 class BubbleDelegateView; |
57 class Widget; | 59 class Widget; |
58 } | 60 } |
59 | 61 |
60 #if defined(OS_WIN) || defined(USE_AURA) | 62 #if defined(OS_WIN) || defined(USE_AURA) |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
184 | 186 |
185 // Retrieves the PageAction View which is associated with |page_action|. | 187 // Retrieves the PageAction View which is associated with |page_action|. |
186 views::View* GetPageActionView(ExtensionAction* page_action); | 188 views::View* GetPageActionView(ExtensionAction* page_action); |
187 | 189 |
188 // Toggles the star on or off. | 190 // Toggles the star on or off. |
189 void SetStarToggled(bool on); | 191 void SetStarToggled(bool on); |
190 | 192 |
191 // Shows the bookmark bubble. | 193 // Shows the bookmark bubble. |
192 void ShowStarBubble(const GURL& url, bool newly_bookmarked); | 194 void ShowStarBubble(const GURL& url, bool newly_bookmarked); |
193 | 195 |
196 // Sets the tooltip for the zoom icon. | |
197 void SetZoomIconTooltipPercent(int zoom_percent); | |
198 | |
199 // Sets the zoom icon state. | |
200 void SetZoomIconState(ZoomController::ZoomIconState zoom_icon_state); | |
201 | |
202 // Show the zoom bubble. | |
203 void ShowZoomBubble(int zoom_percent); | |
204 | |
194 // Shows the Chrome To Mobile bubble. | 205 // Shows the Chrome To Mobile bubble. |
195 void ShowChromeToMobileBubble(); | 206 void ShowChromeToMobileBubble(); |
196 | 207 |
197 // Returns the screen coordinates of the location entry (where the URL text | 208 // Returns the screen coordinates of the location entry (where the URL text |
198 // appears, not where the icons are shown). | 209 // appears, not where the icons are shown). |
199 gfx::Point GetLocationEntryOrigin() const; | 210 gfx::Point GetLocationEntryOrigin() const; |
200 | 211 |
201 #if defined(OS_WIN) || defined(USE_AURA) | 212 #if defined(OS_WIN) || defined(USE_AURA) |
202 // Invoked from OmniboxViewWin to show the instant suggestion. | 213 // Invoked from OmniboxViewWin to show the instant suggestion. |
203 void SetInstantSuggestion(const string16& text, | 214 void SetInstantSuggestion(const string16& text, |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
459 | 470 |
460 // The content setting views. | 471 // The content setting views. |
461 ContentSettingViews content_setting_views_; | 472 ContentSettingViews content_setting_views_; |
462 | 473 |
463 // The page action icon views. | 474 // The page action icon views. |
464 PageActionViews page_action_views_; | 475 PageActionViews page_action_views_; |
465 | 476 |
466 // The star. | 477 // The star. |
467 StarView* star_view_; | 478 StarView* star_view_; |
468 | 479 |
480 // The zoom icon. | |
Peter Kasting
2012/06/22 20:16:20
Shouldn't this icon be placed next to the content
Kyle Horimoto
2012/06/26 21:55:53
Done. Makes sense - I had just put it by the StarV
| |
481 ZoomView* zoom_view_; | |
482 | |
469 // The action box button (plus). | 483 // The action box button (plus). |
470 ActionBoxButtonView* action_box_button_view_; | 484 ActionBoxButtonView* action_box_button_view_; |
471 | 485 |
472 // The Chrome To Mobile page action icon view. | 486 // The Chrome To Mobile page action icon view. |
473 ChromeToMobileView* chrome_to_mobile_view_; | 487 ChromeToMobileView* chrome_to_mobile_view_; |
474 | 488 |
475 // The mode that dictates how the bar shows. | 489 // The mode that dictates how the bar shows. |
476 Mode mode_; | 490 Mode mode_; |
477 | 491 |
478 // True if we should show a focus rect while the location entry field is | 492 // True if we should show a focus rect while the location entry field is |
(...skipping 13 matching lines...) Expand all Loading... | |
492 // in the right location. | 506 // in the right location. |
493 int animation_offset_; | 507 int animation_offset_; |
494 | 508 |
495 // Used to register for notifications received by NotificationObserver. | 509 // Used to register for notifications received by NotificationObserver. |
496 content::NotificationRegistrar registrar_; | 510 content::NotificationRegistrar registrar_; |
497 | 511 |
498 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); | 512 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); |
499 }; | 513 }; |
500 | 514 |
501 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 515 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
OLD | NEW |