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

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

Issue 2555063003: Render extension URLs with chips (Closed)
Patch Set: Chip -> text Created 3 years, 12 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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 304
305 // Updates the Translate icon based on the current tab's Translate status. 305 // Updates the Translate icon based on the current tab's Translate status.
306 void RefreshTranslateIcon(); 306 void RefreshTranslateIcon();
307 307
308 // Updates |manage_passwords_icon_view_|. Returns true if visibility changed. 308 // Updates |manage_passwords_icon_view_|. Returns true if visibility changed.
309 bool RefreshManagePasswordsIconView(); 309 bool RefreshManagePasswordsIconView();
310 310
311 // Helper to show the first run info bubble. 311 // Helper to show the first run info bubble.
312 void ShowFirstRunBubbleInternal(); 312 void ShowFirstRunBubbleInternal();
313 313
314 // Returns text describing the URL's security level, to be placed in the 314 // Returns text to be placed in the location icon view.
315 // security chip. 315 // - For secure/insecure pages, returns text describing the URL's security
316 base::string16 GetSecurityText() const; 316 // level.
317 // - For extension URLs, returns the extension name.
318 base::string16 GetLocationIconText() const;
317 319
318 bool ShouldShowKeywordBubble() const; 320 bool ShouldShowKeywordBubble() const;
319 321
320 // Returns true when the current page is explicitly secure or insecure. 322 // Returns true if any of the following is true:
321 // In these cases, we should show the state of the security chip. 323 // - the current page is explicitly secure or insecure.
322 bool ShouldShowSecurityChip() const; 324 // - the current page URL is a chrome-extension:// URL.
325 bool ShouldShowLocationIconText() const;
323 326
324 // Returns true if the chip should be animated 327 // Returns true if the location icon text should be animated.
325 bool ShouldAnimateSecurityChip() const; 328 bool ShouldAnimateLocationIconTextVisibilityChange() const;
326 329
327 // Used to "reverse" the URL showing/hiding animations, since we use separate 330 // Used to "reverse" the URL showing/hiding animations, since we use separate
328 // animations whose curves are not true inverses of each other. Based on the 331 // animations whose curves are not true inverses of each other. Based on the
329 // current position of the omnibox, calculates what value the desired 332 // current position of the omnibox, calculates what value the desired
330 // animation (|hide_url_animation_| if |hide| is true, |show_url_animation_| 333 // animation (|hide_url_animation_| if |hide| is true, |show_url_animation_|
331 // if it's false) should be set to in order to produce the same omnibox 334 // if it's false) should be set to in order to produce the same omnibox
332 // position. This way we can stop the old animation, set the new animation to 335 // position. This way we can stop the old animation, set the new animation to
333 // this value, and start it running, and the text will appear to reverse 336 // this value, and start it running, and the text will appear to reverse
334 // directions from its current location. 337 // directions from its current location.
335 double GetValueForAnimation(bool hide) const; 338 double GetValueForAnimation(bool hide) const;
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 BooleanPrefMember edit_bookmarks_enabled_; 469 BooleanPrefMember edit_bookmarks_enabled_;
467 470
468 // This is a debug state variable that stores if the WebContents was null 471 // This is a debug state variable that stores if the WebContents was null
469 // during the last RefreshPageAction. 472 // during the last RefreshPageAction.
470 bool web_contents_null_at_last_refresh_; 473 bool web_contents_null_at_last_refresh_;
471 474
472 DISALLOW_COPY_AND_ASSIGN(LocationBarView); 475 DISALLOW_COPY_AND_ASSIGN(LocationBarView);
473 }; 476 };
474 477
475 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ 478 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/location_bar/location_bar.cc ('k') | chrome/browser/ui/views/location_bar/location_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698