| 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 | 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/api/prefs/pref_member.h" | 12 #include "chrome/browser/api/prefs/pref_member.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/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" | |
| 23 #include "content/public/browser/notification_observer.h" | 22 #include "content/public/browser/notification_observer.h" |
| 24 #include "content/public/browser/notification_registrar.h" | 23 #include "content/public/browser/notification_registrar.h" |
| 25 #include "ui/gfx/font.h" | 24 #include "ui/gfx/font.h" |
| 26 #include "ui/gfx/rect.h" | 25 #include "ui/gfx/rect.h" |
| 27 #include "ui/views/controls/native/native_view_host.h" | 26 #include "ui/views/controls/native/native_view_host.h" |
| 28 #include "ui/views/drag_controller.h" | 27 #include "ui/views/drag_controller.h" |
| 29 | 28 |
| 30 #if defined(USE_AURA) | 29 #if defined(USE_AURA) |
| 31 #include "ui/compositor/layer_animation_observer.h" | 30 #include "ui/compositor/layer_animation_observer.h" |
| 32 #endif | 31 #endif |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 // 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 |
| 179 // saved state that the tab holds. | 178 // saved state that the tab holds. |
| 180 void Update(const content::WebContents* tab_for_state_restoring); | 179 void Update(const content::WebContents* tab_for_state_restoring); |
| 181 | 180 |
| 182 // Returns corresponding profile. | 181 // Returns corresponding profile. |
| 183 Profile* profile() const { return profile_; } | 182 Profile* profile() const { return profile_; } |
| 184 | 183 |
| 185 // Returns the delegate. | 184 // Returns the delegate. |
| 186 Delegate* delegate() const { return delegate_; } | 185 Delegate* delegate() const { return delegate_; } |
| 187 | 186 |
| 188 // Sets the tooltip for the zoom icon. | 187 // See comment in browser_window.h for more info. |
| 189 void SetZoomIconTooltipPercent(int zoom_percent); | 188 void ZoomChangedForActiveTab(bool can_show_bubble); |
| 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); | |
| 196 | 189 |
| 197 // Sets |preview_enabled| for the PageAction View associated with this | 190 // Sets |preview_enabled| for the PageAction View associated with this |
| 198 // |page_action|. If |preview_enabled| is true, the view will display the | 191 // |page_action|. If |preview_enabled| is true, the view will display the |
| 199 // PageActions icon even though it has not been activated by the extension. | 192 // PageActions icon even though it has not been activated by the extension. |
| 200 // This is used by the ExtensionInstalledBubble to preview what the icon | 193 // This is used by the ExtensionInstalledBubble to preview what the icon |
| 201 // will look like for the user upon installation of the extension. | 194 // will look like for the user upon installation of the extension. |
| 202 void SetPreviewEnabledPageAction(ExtensionAction* page_action, | 195 void SetPreviewEnabledPageAction(ExtensionAction* page_action, |
| 203 bool preview_enabled); | 196 bool preview_enabled); |
| 204 | 197 |
| 205 // Retrieves the PageAction View which is associated with |page_action|. | 198 // Retrieves the PageAction View which is associated with |page_action|. |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 // actually blocked on the current page. | 407 // actually blocked on the current page. |
| 415 void RefreshContentSettingViews(); | 408 void RefreshContentSettingViews(); |
| 416 | 409 |
| 417 // Delete all page action views that we have created. | 410 // Delete all page action views that we have created. |
| 418 void DeletePageActionViews(); | 411 void DeletePageActionViews(); |
| 419 | 412 |
| 420 // Update the views for the Page Actions, to reflect state changes for | 413 // Update the views for the Page Actions, to reflect state changes for |
| 421 // PageActions. | 414 // PageActions. |
| 422 void RefreshPageActionViews(); | 415 void RefreshPageActionViews(); |
| 423 | 416 |
| 417 // Update the view for the zoom icon based on the current tab's zoom. |
| 418 void RefreshZoomView(); |
| 419 |
| 424 // Sets the visibility of view to new_vis. | 420 // Sets the visibility of view to new_vis. |
| 425 void ToggleVisibility(bool new_vis, views::View* view); | 421 void ToggleVisibility(bool new_vis, views::View* view); |
| 426 | 422 |
| 427 #if !defined(USE_AURA) | 423 #if !defined(USE_AURA) |
| 428 // Helper for the Mouse event handlers that does all the real work. | 424 // Helper for the Mouse event handlers that does all the real work. |
| 429 void OnMouseEvent(const ui::MouseEvent& event, UINT msg); | 425 void OnMouseEvent(const ui::MouseEvent& event, UINT msg); |
| 430 #endif | 426 #endif |
| 431 | 427 |
| 432 // Returns true if the suggest text is valid. | 428 // Returns true if the suggest text is valid. |
| 433 bool HasValidSuggestText() const; | 429 bool HasValidSuggestText() const; |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 | 561 |
| 566 #if defined(USE_AURA) | 562 #if defined(USE_AURA) |
| 567 // Observer for a fade-in animation. | 563 // Observer for a fade-in animation. |
| 568 scoped_ptr<FadeAnimationObserver> fade_animation_observer_; | 564 scoped_ptr<FadeAnimationObserver> fade_animation_observer_; |
| 569 #endif | 565 #endif |
| 570 | 566 |
| 571 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); | 567 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); |
| 572 }; | 568 }; |
| 573 | 569 |
| 574 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 570 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
| OLD | NEW |