| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/prefs/pref_member.h" | 15 #include "base/prefs/pref_member.h" |
| 16 #include "chrome/browser/extensions/extension_context_menu_model.h" | 16 #include "chrome/browser/extensions/extension_context_menu_model.h" |
| 17 #include "chrome/browser/ssl/security_state_model.h" | |
| 18 #include "chrome/browser/ui/location_bar/location_bar.h" | 17 #include "chrome/browser/ui/location_bar/location_bar.h" |
| 19 #include "chrome/browser/ui/omnibox/chrome_omnibox_edit_controller.h" | 18 #include "chrome/browser/ui/omnibox/chrome_omnibox_edit_controller.h" |
| 20 #include "chrome/browser/ui/toolbar/chrome_toolbar_model.h" | 19 #include "chrome/browser/ui/toolbar/chrome_toolbar_model.h" |
| 21 #include "chrome/browser/ui/views/dropdown_bar_host.h" | 20 #include "chrome/browser/ui/views/dropdown_bar_host.h" |
| 22 #include "chrome/browser/ui/views/dropdown_bar_host_delegate.h" | 21 #include "chrome/browser/ui/views/dropdown_bar_host_delegate.h" |
| 23 #include "chrome/browser/ui/views/extensions/extension_popup.h" | 22 #include "chrome/browser/ui/views/extensions/extension_popup.h" |
| 24 #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h" | 23 #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h" |
| 25 #include "components/search_engines/template_url_service_observer.h" | 24 #include "components/search_engines/template_url_service_observer.h" |
| 25 #include "components/security_state/security_state_model.h" |
| 26 #include "components/ui/zoom/zoom_event_manager_observer.h" | 26 #include "components/ui/zoom/zoom_event_manager_observer.h" |
| 27 #include "ui/gfx/animation/animation_delegate.h" | 27 #include "ui/gfx/animation/animation_delegate.h" |
| 28 #include "ui/gfx/animation/slide_animation.h" | 28 #include "ui/gfx/animation/slide_animation.h" |
| 29 #include "ui/gfx/font.h" | 29 #include "ui/gfx/font.h" |
| 30 #include "ui/gfx/geometry/rect.h" | 30 #include "ui/gfx/geometry/rect.h" |
| 31 #include "ui/views/drag_controller.h" | 31 #include "ui/views/drag_controller.h" |
| 32 | 32 |
| 33 class ActionBoxButtonView; | 33 class ActionBoxButtonView; |
| 34 class CommandUpdater; | 34 class CommandUpdater; |
| 35 class ContentSettingBubbleModelDelegate; | 35 class ContentSettingBubbleModelDelegate; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 ExtensionAction* action) = 0; | 99 ExtensionAction* action) = 0; |
| 100 | 100 |
| 101 // Returns ContentSettingBubbleModelDelegate. | 101 // Returns ContentSettingBubbleModelDelegate. |
| 102 virtual ContentSettingBubbleModelDelegate* | 102 virtual ContentSettingBubbleModelDelegate* |
| 103 GetContentSettingBubbleModelDelegate() = 0; | 103 GetContentSettingBubbleModelDelegate() = 0; |
| 104 | 104 |
| 105 // Shows permissions and settings for the given web contents. | 105 // Shows permissions and settings for the given web contents. |
| 106 virtual void ShowWebsiteSettings( | 106 virtual void ShowWebsiteSettings( |
| 107 content::WebContents* web_contents, | 107 content::WebContents* web_contents, |
| 108 const GURL& url, | 108 const GURL& url, |
| 109 const SecurityStateModel::SecurityInfo& security_info) = 0; | 109 const security_state::SecurityStateModel::SecurityInfo& |
| 110 security_info) = 0; |
| 110 | 111 |
| 111 protected: | 112 protected: |
| 112 virtual ~Delegate() {} | 113 virtual ~Delegate() {} |
| 113 }; | 114 }; |
| 114 | 115 |
| 115 enum ColorKind { | 116 enum ColorKind { |
| 116 BACKGROUND = 0, | 117 BACKGROUND = 0, |
| 117 TEXT, | 118 TEXT, |
| 118 SELECTED_TEXT, | 119 SELECTED_TEXT, |
| 119 DEEMPHASIZED_TEXT, | 120 DEEMPHASIZED_TEXT, |
| (...skipping 15 matching lines...) Expand all Loading... |
| 135 // be called when the receiving instance is attached to a view container. | 136 // be called when the receiving instance is attached to a view container. |
| 136 bool IsInitialized() const; | 137 bool IsInitialized() const; |
| 137 | 138 |
| 138 // Returns the appropriate color for the desired kind, based on the user's | 139 // Returns the appropriate color for the desired kind, based on the user's |
| 139 // system theme. | 140 // system theme. |
| 140 SkColor GetColor(ColorKind kind) const; | 141 SkColor GetColor(ColorKind kind) const; |
| 141 | 142 |
| 142 // Returns the color to be used for security text in the context of | 143 // Returns the color to be used for security text in the context of |
| 143 // |security_level|. | 144 // |security_level|. |
| 144 SkColor GetSecureTextColor( | 145 SkColor GetSecureTextColor( |
| 145 SecurityStateModel::SecurityLevel security_level) const; | 146 security_state::SecurityStateModel::SecurityLevel security_level) const; |
| 146 | 147 |
| 147 // Returns the delegate. | 148 // Returns the delegate. |
| 148 Delegate* delegate() const { return delegate_; } | 149 Delegate* delegate() const { return delegate_; } |
| 149 | 150 |
| 150 // See comment in browser_window.h for more info. | 151 // See comment in browser_window.h for more info. |
| 151 void ZoomChangedForActiveTab(bool can_show_bubble); | 152 void ZoomChangedForActiveTab(bool can_show_bubble); |
| 152 | 153 |
| 153 // The zoom icon. It may not be visible. | 154 // The zoom icon. It may not be visible. |
| 154 ZoomView* zoom_view() { return zoom_view_; } | 155 ZoomView* zoom_view() { return zoom_view_; } |
| 155 | 156 |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 BooleanPrefMember edit_bookmarks_enabled_; | 475 BooleanPrefMember edit_bookmarks_enabled_; |
| 475 | 476 |
| 476 // This is a debug state variable that stores if the WebContents was null | 477 // This is a debug state variable that stores if the WebContents was null |
| 477 // during the last RefreshPageAction. | 478 // during the last RefreshPageAction. |
| 478 bool web_contents_null_at_last_refresh_; | 479 bool web_contents_null_at_last_refresh_; |
| 479 | 480 |
| 480 DISALLOW_COPY_AND_ASSIGN(LocationBarView); | 481 DISALLOW_COPY_AND_ASSIGN(LocationBarView); |
| 481 }; | 482 }; |
| 482 | 483 |
| 483 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 484 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
| OLD | NEW |