Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(545)

Side by Side Diff: chrome/browser/ui/views/location_bar/location_bar_view.h

Issue 1539043002: Pull SecurityStateModel out into a component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unit test debugging Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "base/prefs/pref_member.h" 12 #include "base/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/ssl/security_state_model.h"
15 #include "chrome/browser/ui/location_bar/location_bar.h" 14 #include "chrome/browser/ui/location_bar/location_bar.h"
16 #include "chrome/browser/ui/omnibox/chrome_omnibox_edit_controller.h" 15 #include "chrome/browser/ui/omnibox/chrome_omnibox_edit_controller.h"
17 #include "chrome/browser/ui/toolbar/chrome_toolbar_model.h" 16 #include "chrome/browser/ui/toolbar/chrome_toolbar_model.h"
18 #include "chrome/browser/ui/views/dropdown_bar_host.h" 17 #include "chrome/browser/ui/views/dropdown_bar_host.h"
19 #include "chrome/browser/ui/views/dropdown_bar_host_delegate.h" 18 #include "chrome/browser/ui/views/dropdown_bar_host_delegate.h"
20 #include "chrome/browser/ui/views/extensions/extension_popup.h" 19 #include "chrome/browser/ui/views/extensions/extension_popup.h"
21 #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h" 20 #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h"
22 #include "components/search_engines/template_url_service_observer.h" 21 #include "components/search_engines/template_url_service_observer.h"
22 #include "components/security_state/security_state_model.h"
23 #include "components/ui/zoom/zoom_event_manager_observer.h" 23 #include "components/ui/zoom/zoom_event_manager_observer.h"
24 #include "ui/gfx/animation/animation_delegate.h" 24 #include "ui/gfx/animation/animation_delegate.h"
25 #include "ui/gfx/animation/slide_animation.h" 25 #include "ui/gfx/animation/slide_animation.h"
26 #include "ui/gfx/font.h" 26 #include "ui/gfx/font.h"
27 #include "ui/gfx/geometry/rect.h" 27 #include "ui/gfx/geometry/rect.h"
28 #include "ui/views/drag_controller.h" 28 #include "ui/views/drag_controller.h"
29 29
30 class ActionBoxButtonView; 30 class ActionBoxButtonView;
31 class CommandUpdater; 31 class CommandUpdater;
32 class ContentSettingBubbleModelDelegate; 32 class ContentSettingBubbleModelDelegate;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 ExtensionAction* action) = 0; 96 ExtensionAction* action) = 0;
97 97
98 // Returns ContentSettingBubbleModelDelegate. 98 // Returns ContentSettingBubbleModelDelegate.
99 virtual ContentSettingBubbleModelDelegate* 99 virtual ContentSettingBubbleModelDelegate*
100 GetContentSettingBubbleModelDelegate() = 0; 100 GetContentSettingBubbleModelDelegate() = 0;
101 101
102 // Shows permissions and settings for the given web contents. 102 // Shows permissions and settings for the given web contents.
103 virtual void ShowWebsiteSettings( 103 virtual void ShowWebsiteSettings(
104 content::WebContents* web_contents, 104 content::WebContents* web_contents,
105 const GURL& url, 105 const GURL& url,
106 const SecurityStateModel::SecurityInfo& security_info) = 0; 106 const security_state::SecurityStateModel::SecurityInfo&
107 security_info) = 0;
107 108
108 protected: 109 protected:
109 virtual ~Delegate() {} 110 virtual ~Delegate() {}
110 }; 111 };
111 112
112 enum ColorKind { 113 enum ColorKind {
113 BACKGROUND = 0, 114 BACKGROUND = 0,
114 TEXT, 115 TEXT,
115 SELECTED_TEXT, 116 SELECTED_TEXT,
116 DEEMPHASIZED_TEXT, 117 DEEMPHASIZED_TEXT,
(...skipping 15 matching lines...) Expand all
132 // be called when the receiving instance is attached to a view container. 133 // be called when the receiving instance is attached to a view container.
133 bool IsInitialized() const; 134 bool IsInitialized() const;
134 135
135 // Returns the appropriate color for the desired kind, based on the user's 136 // Returns the appropriate color for the desired kind, based on the user's
136 // system theme. 137 // system theme.
137 SkColor GetColor(ColorKind kind) const; 138 SkColor GetColor(ColorKind kind) const;
138 139
139 // Returns the color to be used for security text in the context of 140 // Returns the color to be used for security text in the context of
140 // |security_level|. 141 // |security_level|.
141 SkColor GetSecureTextColor( 142 SkColor GetSecureTextColor(
142 SecurityStateModel::SecurityLevel security_level) const; 143 security_state::SecurityStateModel::SecurityLevel security_level) const;
143 144
144 // Returns the delegate. 145 // Returns the delegate.
145 Delegate* delegate() const { return delegate_; } 146 Delegate* delegate() const { return delegate_; }
146 147
147 // See comment in browser_window.h for more info. 148 // See comment in browser_window.h for more info.
148 void ZoomChangedForActiveTab(bool can_show_bubble); 149 void ZoomChangedForActiveTab(bool can_show_bubble);
149 150
150 // The zoom icon. It may not be visible. 151 // The zoom icon. It may not be visible.
151 ZoomView* zoom_view() { return zoom_view_; } 152 ZoomView* zoom_view() { return zoom_view_; }
152 153
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 BooleanPrefMember edit_bookmarks_enabled_; 472 BooleanPrefMember edit_bookmarks_enabled_;
472 473
473 // This is a debug state variable that stores if the WebContents was null 474 // This is a debug state variable that stores if the WebContents was null
474 // during the last RefreshPageAction. 475 // during the last RefreshPageAction.
475 bool web_contents_null_at_last_refresh_; 476 bool web_contents_null_at_last_refresh_;
476 477
477 DISALLOW_COPY_AND_ASSIGN(LocationBarView); 478 DISALLOW_COPY_AND_ASSIGN(LocationBarView);
478 }; 479 };
479 480
480 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ 481 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698