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

Unified Diff: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm

Issue 731423002: Remove OriginChip code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix gyp file and bad merge Created 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
index 61162a891c9f497541881e074c8ed638256242ae..608ec33e1f0b873e779b411b5f55e9bf1781b3f2 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
+++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
@@ -42,7 +42,6 @@
#import "chrome/browser/ui/cocoa/location_bar/location_icon_decoration.h"
#import "chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration.h"
#import "chrome/browser/ui/cocoa/location_bar/mic_search_decoration.h"
-#import "chrome/browser/ui/cocoa/location_bar/origin_chip_decoration.h"
#import "chrome/browser/ui/cocoa/location_bar/page_action_decoration.h"
#import "chrome/browser/ui/cocoa/location_bar/search_button_decoration.h"
#import "chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration.h"
@@ -139,10 +138,6 @@ LocationBarViewMac::LocationBarViewMac(AutocompleteTextField* field,
[[field_ cell] setIsPopupMode:
!browser->SupportsWindowFeature(Browser::FEATURE_TABSTRIP)];
- if (chrome::ShouldDisplayOriginChip())
- origin_chip_decoration_.reset(new OriginChipDecoration(
- this, location_icon_decoration_.get()));
-
// Sets images for the decorations, and performs a layout. This call ensures
// that this class is in a consistent state after initialization.
OnChanged();
@@ -369,9 +364,7 @@ NSPoint LocationBarViewMac::GetManagePasswordsBubblePoint() const {
}
NSPoint LocationBarViewMac::GetPageInfoBubblePoint() const {
- if (origin_chip_decoration_ && origin_chip_decoration_->IsVisible()) {
- return [field_ bubblePointForDecoration:origin_chip_decoration_.get()];
- } else if (ev_bubble_decoration_->IsVisible()) {
+ if (ev_bubble_decoration_->IsVisible()) {
return [field_ bubblePointForDecoration:ev_bubble_decoration_.get()];
} else {
return [field_ bubblePointForDecoration:location_icon_decoration_.get()];
@@ -401,12 +394,9 @@ void LocationBarViewMac::Layout() {
// the constructor. I am still wrestling with how best to deal with
// right-hand decorations, which are not a static set.
[cell clearDecorations];
- if (origin_chip_decoration_.get())
- [cell addLeftDecoration:origin_chip_decoration_.get()];
[cell addLeftDecoration:location_icon_decoration_.get()];
[cell addLeftDecoration:selected_keyword_decoration_.get()];
- if (!origin_chip_decoration_.get())
- [cell addLeftDecoration:ev_bubble_decoration_.get()];
+ [cell addLeftDecoration:ev_bubble_decoration_.get()];
[cell addRightDecoration:search_button_decoration_.get()];
[cell addRightDecoration:star_decoration_.get()];
[cell addRightDecoration:translate_decoration_.get()];
@@ -429,8 +419,7 @@ void LocationBarViewMac::Layout() {
[cell addRightDecoration:mic_search_decoration_.get()];
// By default only the location icon is visible.
- location_icon_decoration_->SetVisible(!origin_chip_decoration_.get() ||
- !origin_chip_decoration_->IsVisible());
+ location_icon_decoration_->SetVisible(true);
selected_keyword_decoration_->SetVisible(false);
ev_bubble_decoration_->SetVisible(false);
keyword_hint_decoration_->SetVisible(false);
@@ -452,7 +441,7 @@ void LocationBarViewMac::Layout() {
selected_keyword_decoration_->SetKeyword(short_name, is_extension_keyword);
selected_keyword_decoration_->SetImage(GetKeywordImage(keyword));
} else if ((GetToolbarModel()->GetSecurityLevel(false) ==
- ToolbarModel::EV_SECURE) && !origin_chip_decoration_.get()) {
+ ToolbarModel::EV_SECURE)) {
// Switch from location icon to show the EV bubble instead.
location_icon_decoration_->SetVisible(false);
ev_bubble_decoration_->SetVisible(true);
@@ -554,9 +543,6 @@ void LocationBarViewMac::OnChanged() {
location_icon_decoration_->SetImage(image);
ev_bubble_decoration_->SetImage(image);
- if (origin_chip_decoration_.get())
- origin_chip_decoration_->Update();
-
ToolbarModel* toolbar_model = GetToolbarModel();
const chrome::DisplaySearchButtonConditions conditions =
chrome::GetDisplaySearchButtonConditions();
@@ -591,13 +577,6 @@ void LocationBarViewMac::ShowURL() {
omnibox_view_->ShowURL();
}
-void LocationBarViewMac::HideURL() {
- omnibox_view_->HideURL();
-}
-
-void LocationBarViewMac::EndOriginChipAnimations(bool cancel_fade) {
-}
-
InstantController* LocationBarViewMac::GetInstant() {
return browser_->instant_controller() ?
browser_->instant_controller()->instant() : NULL;

Powered by Google App Engine
This is Rietveld 408576698