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 "chrome/browser/extensions/extension_context_menu_model.h" | 15 #include "chrome/browser/extensions/extension_context_menu_model.h" |
16 #include "chrome/browser/ui/location_bar/location_bar.h" | 16 #include "chrome/browser/ui/location_bar/location_bar.h" |
17 #include "chrome/browser/ui/omnibox/chrome_omnibox_edit_controller.h" | 17 #include "chrome/browser/ui/omnibox/chrome_omnibox_edit_controller.h" |
18 #include "chrome/browser/ui/views/dropdown_bar_host.h" | 18 #include "chrome/browser/ui/views/dropdown_bar_host.h" |
19 #include "chrome/browser/ui/views/dropdown_bar_host_delegate.h" | 19 #include "chrome/browser/ui/views/dropdown_bar_host_delegate.h" |
20 #include "chrome/browser/ui/views/extensions/extension_popup.h" | 20 #include "chrome/browser/ui/views/extensions/extension_popup.h" |
21 #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h" | 21 #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h" |
22 #include "components/prefs/pref_member.h" | 22 #include "components/prefs/pref_member.h" |
23 #include "components/search_engines/template_url_service_observer.h" | 23 #include "components/search_engines/template_url_service_observer.h" |
24 #include "components/security_state/security_state_model.h" | 24 #include "components/security_state/core/security_state.h" |
25 #include "components/zoom/zoom_event_manager_observer.h" | 25 #include "components/zoom/zoom_event_manager_observer.h" |
26 #include "ui/gfx/animation/animation_delegate.h" | 26 #include "ui/gfx/animation/animation_delegate.h" |
27 #include "ui/gfx/animation/slide_animation.h" | 27 #include "ui/gfx/animation/slide_animation.h" |
28 #include "ui/gfx/font.h" | 28 #include "ui/gfx/font.h" |
29 #include "ui/gfx/geometry/rect.h" | 29 #include "ui/gfx/geometry/rect.h" |
30 #include "ui/views/drag_controller.h" | 30 #include "ui/views/drag_controller.h" |
31 | 31 |
32 class ActionBoxButtonView; | 32 class ActionBoxButtonView; |
33 class CommandUpdater; | 33 class CommandUpdater; |
34 class ContentSettingBubbleModelDelegate; | 34 class ContentSettingBubbleModelDelegate; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 ExtensionAction* action) = 0; | 90 ExtensionAction* action) = 0; |
91 | 91 |
92 // Returns ContentSettingBubbleModelDelegate. | 92 // Returns ContentSettingBubbleModelDelegate. |
93 virtual ContentSettingBubbleModelDelegate* | 93 virtual ContentSettingBubbleModelDelegate* |
94 GetContentSettingBubbleModelDelegate() = 0; | 94 GetContentSettingBubbleModelDelegate() = 0; |
95 | 95 |
96 // Shows permissions and settings for the given web contents. | 96 // Shows permissions and settings for the given web contents. |
97 virtual void ShowWebsiteSettings( | 97 virtual void ShowWebsiteSettings( |
98 content::WebContents* web_contents, | 98 content::WebContents* web_contents, |
99 const GURL& virtual_url, | 99 const GURL& virtual_url, |
100 const security_state::SecurityStateModel::SecurityInfo& | 100 const security_state::SecurityInfo& security_info) = 0; |
101 security_info) = 0; | |
102 | 101 |
103 protected: | 102 protected: |
104 virtual ~Delegate() {} | 103 virtual ~Delegate() {} |
105 }; | 104 }; |
106 | 105 |
107 enum ColorKind { | 106 enum ColorKind { |
108 BACKGROUND = 0, | 107 BACKGROUND = 0, |
109 TEXT, | 108 TEXT, |
110 SELECTED_TEXT, | 109 SELECTED_TEXT, |
111 DEEMPHASIZED_TEXT, | 110 DEEMPHASIZED_TEXT, |
(...skipping 25 matching lines...) Expand all Loading... |
137 // 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. |
138 bool IsInitialized() const; | 137 bool IsInitialized() const; |
139 | 138 |
140 // 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 |
141 // system theme. | 140 // system theme. |
142 SkColor GetColor(ColorKind kind) const; | 141 SkColor GetColor(ColorKind kind) const; |
143 | 142 |
144 // 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 |
145 // |security_level|. | 144 // |security_level|. |
146 SkColor GetSecureTextColor( | 145 SkColor GetSecureTextColor( |
147 security_state::SecurityStateModel::SecurityLevel security_level) const; | 146 security_state::SecurityLevel security_level) const; |
148 | 147 |
149 // Returns the delegate. | 148 // Returns the delegate. |
150 Delegate* delegate() const { return delegate_; } | 149 Delegate* delegate() const { return delegate_; } |
151 | 150 |
152 // See comment in browser_window.h for more info. | 151 // See comment in browser_window.h for more info. |
153 void ZoomChangedForActiveTab(bool can_show_bubble); | 152 void ZoomChangedForActiveTab(bool can_show_bubble); |
154 | 153 |
155 // The zoom icon. It may not be visible. | 154 // The zoom icon. It may not be visible. |
156 ZoomView* zoom_view() { return zoom_view_; } | 155 ZoomView* zoom_view() { return zoom_view_; } |
157 | 156 |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 // These allow toggling the verbose security state behavior via flags. | 481 // These allow toggling the verbose security state behavior via flags. |
483 bool should_show_secure_state_; | 482 bool should_show_secure_state_; |
484 bool should_show_nonsecure_state_; | 483 bool should_show_nonsecure_state_; |
485 bool should_animate_secure_state_; | 484 bool should_animate_secure_state_; |
486 bool should_animate_nonsecure_state_; | 485 bool should_animate_nonsecure_state_; |
487 | 486 |
488 DISALLOW_COPY_AND_ASSIGN(LocationBarView); | 487 DISALLOW_COPY_AND_ASSIGN(LocationBarView); |
489 }; | 488 }; |
490 | 489 |
491 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 490 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
OLD | NEW |