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

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

Issue 2682803003: Gtk3: Add themable location bar border color (Closed)
Patch Set: add location_bar_border_color local Created 3 years, 10 months 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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 static const char kViewClassName[]; 119 static const char kViewClassName[];
120 120
121 LocationBarView(Browser* browser, 121 LocationBarView(Browser* browser,
122 Profile* profile, 122 Profile* profile,
123 CommandUpdater* command_updater, 123 CommandUpdater* command_updater,
124 Delegate* delegate, 124 Delegate* delegate,
125 bool is_popup_mode); 125 bool is_popup_mode);
126 126
127 ~LocationBarView() override; 127 ~LocationBarView() override;
128 128
129 // Returns the location bar border color blended with the toolbar color.
130 // It's guaranteed to be opaque.
131 static SkColor GetOpaqueBorderColor(bool incognito);
132
133 // Initializes the LocationBarView. 129 // Initializes the LocationBarView.
134 void Init(); 130 void Init();
135 131
136 // True if this instance has been initialized by calling Init, which can only 132 // True if this instance has been initialized by calling Init, which can only
137 // 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.
138 bool IsInitialized() const; 134 bool IsInitialized() const;
139 135
140 // 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
141 // system theme. 137 // system theme.
142 SkColor GetColor(ColorKind kind) const; 138 SkColor GetColor(ColorKind kind) const;
143 139
140 // Returns the location bar border color blended with the toolbar color.
141 // It's guaranteed to be opaque.
142 SkColor GetOpaqueBorderColor(bool incognito);
143
144 // Returns the color to be used for security text in the context of 144 // Returns the color to be used for security text in the context of
145 // |security_level|. 145 // |security_level|.
146 SkColor GetSecureTextColor( 146 SkColor GetSecureTextColor(
147 security_state::SecurityLevel security_level) const; 147 security_state::SecurityLevel security_level) const;
148 148
149 // Returns the delegate. 149 // Returns the delegate.
150 Delegate* delegate() const { return delegate_; } 150 Delegate* delegate() const { return delegate_; }
151 151
152 // See comment in browser_window.h for more info. 152 // See comment in browser_window.h for more info.
153 void ZoomChangedForActiveTab(bool can_show_bubble); 153 void ZoomChangedForActiveTab(bool can_show_bubble);
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 248
249 friend class PageActionImageView; 249 friend class PageActionImageView;
250 friend class PageActionWithBadgeView; 250 friend class PageActionWithBadgeView;
251 using PageActions = std::vector<ExtensionAction*>; 251 using PageActions = std::vector<ExtensionAction*>;
252 using PageActionViews = std::vector<std::unique_ptr<PageActionWithBadgeView>>; 252 using PageActionViews = std::vector<std::unique_ptr<PageActionWithBadgeView>>;
253 253
254 // Helper for GetMinimumWidth(). Calculates the incremental minimum width 254 // Helper for GetMinimumWidth(). Calculates the incremental minimum width
255 // |view| should add to the trailing width after the omnibox. 255 // |view| should add to the trailing width after the omnibox.
256 int IncrementalMinimumWidth(views::View* view) const; 256 int IncrementalMinimumWidth(views::View* view) const;
257 257
258 // The border color, drawn on top of the toolbar.
259 SkColor GetBorderColor();
260
258 // Returns the thickness of any visible edge, in pixels. 261 // Returns the thickness of any visible edge, in pixels.
259 int GetHorizontalEdgeThickness() const; 262 int GetHorizontalEdgeThickness() const;
260 int GetVerticalEdgeThickness() const; 263 int GetVerticalEdgeThickness() const;
261 264
262 // Returns the total amount of space reserved above or below the content, 265 // Returns the total amount of space reserved above or below the content,
263 // which is the vertical edge thickness plus the padding next to it. 266 // which is the vertical edge thickness plus the padding next to it.
264 int GetTotalVerticalPadding() const; 267 int GetTotalVerticalPadding() const;
265 268
266 // Updates |location_icon_view_| based on the current state and theme. 269 // Updates |location_icon_view_| based on the current state and theme.
267 void RefreshLocationIcon(); 270 void RefreshLocationIcon();
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 BooleanPrefMember edit_bookmarks_enabled_; 459 BooleanPrefMember edit_bookmarks_enabled_;
457 460
458 // This is a debug state variable that stores if the WebContents was null 461 // This is a debug state variable that stores if the WebContents was null
459 // during the last RefreshPageAction. 462 // during the last RefreshPageAction.
460 bool web_contents_null_at_last_refresh_; 463 bool web_contents_null_at_last_refresh_;
461 464
462 DISALLOW_COPY_AND_ASSIGN(LocationBarView); 465 DISALLOW_COPY_AND_ASSIGN(LocationBarView);
463 }; 466 };
464 467
465 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ 468 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698