| 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; |
| 51 class TabContentsWrapper; | 53 class TabContentsWrapper; |
| 52 class TemplateURLService; | 54 class TemplateURLService; |
| 53 | 55 |
| 54 namespace views { | 56 namespace views { |
| 55 class BubbleDelegateView; | 57 class BubbleDelegateView; |
| 56 class Widget; | 58 class Widget; |
| 57 } | 59 } |
| 58 | 60 |
| 59 #if defined(OS_WIN) || defined(USE_AURA) | 61 #if defined(OS_WIN) || defined(USE_AURA) |
| 60 class SuggestedTextView; | 62 class SuggestedTextView; |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 | 185 |
| 184 // Retrieves the PageAction View which is associated with |page_action|. | 186 // Retrieves the PageAction View which is associated with |page_action|. |
| 185 views::View* GetPageActionView(ExtensionAction* page_action); | 187 views::View* GetPageActionView(ExtensionAction* page_action); |
| 186 | 188 |
| 187 // Toggles the star on or off. | 189 // Toggles the star on or off. |
| 188 void SetStarToggled(bool on); | 190 void SetStarToggled(bool on); |
| 189 | 191 |
| 190 // Shows the bookmark bubble. | 192 // Shows the bookmark bubble. |
| 191 void ShowStarBubble(const GURL& url, bool newly_bookmarked); | 193 void ShowStarBubble(const GURL& url, bool newly_bookmarked); |
| 192 | 194 |
| 195 // Sets the tooltip for the zoom icon. |
| 196 void SetZoomIconTooltipPercent(int zoom_percent); |
| 197 |
| 198 // Sets the zoom icon state. |
| 199 void SetZoomIconState(ZoomController::ZoomIconState zoom_icon_state); |
| 200 |
| 201 // Show the zoom bubble. |
| 202 void ShowZoomBubble(int zoom_percent); |
| 203 |
| 193 // Shows the Chrome To Mobile bubble. | 204 // Shows the Chrome To Mobile bubble. |
| 194 void ShowChromeToMobileBubble(); | 205 void ShowChromeToMobileBubble(); |
| 195 | 206 |
| 196 // Returns the screen coordinates of the location entry (where the URL text | 207 // Returns the screen coordinates of the location entry (where the URL text |
| 197 // appears, not where the icons are shown). | 208 // appears, not where the icons are shown). |
| 198 gfx::Point GetLocationEntryOrigin() const; | 209 gfx::Point GetLocationEntryOrigin() const; |
| 199 | 210 |
| 200 #if defined(OS_WIN) || defined(USE_AURA) | 211 #if defined(OS_WIN) || defined(USE_AURA) |
| 201 // Invoked from OmniboxViewWin to show the instant suggestion. | 212 // Invoked from OmniboxViewWin to show the instant suggestion. |
| 202 void SetInstantSuggestion(const string16& text, | 213 void SetInstantSuggestion(const string16& text, |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 | 469 |
| 459 // The content setting views. | 470 // The content setting views. |
| 460 ContentSettingViews content_setting_views_; | 471 ContentSettingViews content_setting_views_; |
| 461 | 472 |
| 462 // The page action icon views. | 473 // The page action icon views. |
| 463 PageActionViews page_action_views_; | 474 PageActionViews page_action_views_; |
| 464 | 475 |
| 465 // The star. | 476 // The star. |
| 466 StarView* star_view_; | 477 StarView* star_view_; |
| 467 | 478 |
| 479 // The zoom icon. |
| 480 ZoomView* zoom_view_; |
| 481 |
| 468 // The action box button (plus). | 482 // The action box button (plus). |
| 469 ActionBoxButtonView* action_box_button_view_; | 483 ActionBoxButtonView* action_box_button_view_; |
| 470 | 484 |
| 471 // The Chrome To Mobile page action icon view. | 485 // The Chrome To Mobile page action icon view. |
| 472 ChromeToMobileView* chrome_to_mobile_view_; | 486 ChromeToMobileView* chrome_to_mobile_view_; |
| 473 | 487 |
| 474 // The mode that dictates how the bar shows. | 488 // The mode that dictates how the bar shows. |
| 475 Mode mode_; | 489 Mode mode_; |
| 476 | 490 |
| 477 // True if we should show a focus rect while the location entry field is | 491 // True if we should show a focus rect while the location entry field is |
| (...skipping 13 matching lines...) Expand all Loading... |
| 491 // in the right location. | 505 // in the right location. |
| 492 int animation_offset_; | 506 int animation_offset_; |
| 493 | 507 |
| 494 // Used to register for notifications received by NotificationObserver. | 508 // Used to register for notifications received by NotificationObserver. |
| 495 content::NotificationRegistrar registrar_; | 509 content::NotificationRegistrar registrar_; |
| 496 | 510 |
| 497 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); | 511 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); |
| 498 }; | 512 }; |
| 499 | 513 |
| 500 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 514 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
| OLD | NEW |