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

Side by Side Diff: chrome/browser/ui/views/location_bar/location_icon_view.cc

Issue 1995813002: Use the virtual URL of the page in the Page Info Bubble (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Mac build Created 4 years, 6 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 #include "chrome/browser/ui/views/location_bar/location_icon_view.h" 5 #include "chrome/browser/ui/views/location_bar/location_icon_view.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/ssl/chrome_security_state_model_client.h" 8 #include "chrome/browser/ssl/chrome_security_state_model_client.h"
9 #include "chrome/browser/ui/view_ids.h" 9 #include "chrome/browser/ui/view_ids.h"
10 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" 10 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 NavigationEntry* entry = contents->GetController().GetVisibleEntry(); 139 NavigationEntry* entry = contents->GetController().GetVisibleEntry();
140 // The visible entry can be nullptr in the case of window.open(""). 140 // The visible entry can be nullptr in the case of window.open("").
141 if (!entry) 141 if (!entry)
142 return false; 142 return false;
143 143
144 ChromeSecurityStateModelClient* model_client = 144 ChromeSecurityStateModelClient* model_client =
145 ChromeSecurityStateModelClient::FromWebContents(contents); 145 ChromeSecurityStateModelClient::FromWebContents(contents);
146 DCHECK(model_client); 146 DCHECK(model_client);
147 147
148 location_bar_->delegate()->ShowWebsiteSettings( 148 location_bar_->delegate()->ShowWebsiteSettings(
149 contents, entry->GetURL(), model_client->GetSecurityInfo()); 149 contents, entry->GetVirtualURL(), model_client->GetSecurityInfo());
150 return true; 150 return true;
151 } 151 }
152 152
153 gfx::Size LocationIconView::GetMinimumSizeForPreferredSize( 153 gfx::Size LocationIconView::GetMinimumSizeForPreferredSize(
154 gfx::Size size) const { 154 gfx::Size size) const {
155 const int kMinCharacters = 10; 155 const int kMinCharacters = 10;
156 size.SetToMin( 156 size.SetToMin(
157 GetSizeForLabelWidth(font_list().GetExpectedTextWidth(kMinCharacters))); 157 GetSizeForLabelWidth(font_list().GetExpectedTextWidth(kMinCharacters)));
158 return size; 158 return size;
159 } 159 }
160 160
161 void LocationIconView::SetBackground(bool should_show_ev) { 161 void LocationIconView::SetBackground(bool should_show_ev) {
162 static const int kEvBackgroundImages[] = IMAGE_GRID(IDR_OMNIBOX_EV_BUBBLE); 162 static const int kEvBackgroundImages[] = IMAGE_GRID(IDR_OMNIBOX_EV_BUBBLE);
163 if (should_show_ev) 163 if (should_show_ev)
164 SetBackgroundImageGrid(kEvBackgroundImages); 164 SetBackgroundImageGrid(kEvBackgroundImages);
165 else 165 else
166 UnsetBackgroundImageGrid(); 166 UnsetBackgroundImageGrid();
167 } 167 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.h ('k') | chrome/browser/ui/views/toolbar/toolbar_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698