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

Side by Side Diff: chrome/browser/ui/views/website_settings/website_settings_popup_view.cc

Issue 1280673003: [Mac] Enable MacViews site settings bubble behind --enable-mac-views-dialogs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@enabledialogs
Patch Set: Sync Created 5 years, 4 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/website_settings/website_settings_popup_view.h " 5 #include "chrome/browser/ui/views/website_settings/website_settings_popup_view.h "
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 } 266 }
267 267
268 //////////////////////////////////////////////////////////////////////////////// 268 ////////////////////////////////////////////////////////////////////////////////
269 // WebsiteSettingsPopupView 269 // WebsiteSettingsPopupView
270 //////////////////////////////////////////////////////////////////////////////// 270 ////////////////////////////////////////////////////////////////////////////////
271 271
272 WebsiteSettingsPopupView::~WebsiteSettingsPopupView() { 272 WebsiteSettingsPopupView::~WebsiteSettingsPopupView() {
273 } 273 }
274 274
275 // static 275 // static
276 void WebsiteSettingsPopupView::ShowPopup(views::View* anchor_view, 276 views::BubbleDelegateView* WebsiteSettingsPopupView::ShowPopup(
277 Profile* profile, 277 views::View* anchor_view,
278 content::WebContents* web_contents, 278 Profile* profile,
279 const GURL& url, 279 content::WebContents* web_contents,
280 const content::SSLStatus& ssl) { 280 const GURL& url,
281 const content::SSLStatus& ssl) {
281 is_popup_showing = true; 282 is_popup_showing = true;
282 if (InternalChromePage(url)) { 283 if (InternalChromePage(url)) {
283 new InternalPageInfoPopupView(anchor_view); 284 return new InternalPageInfoPopupView(anchor_view);
284 } else { 285 } else {
285 new WebsiteSettingsPopupView(anchor_view, profile, web_contents, url, ssl); 286 return new WebsiteSettingsPopupView(anchor_view, profile, web_contents, url,
287 ssl);
286 } 288 }
287 } 289 }
288 290
289 // static 291 // static
290 bool WebsiteSettingsPopupView::IsPopupShowing() { 292 bool WebsiteSettingsPopupView::IsPopupShowing() {
291 return is_popup_showing; 293 return is_popup_showing;
292 } 294 }
293 295
294 WebsiteSettingsPopupView::WebsiteSettingsPopupView( 296 WebsiteSettingsPopupView::WebsiteSettingsPopupView(
295 views::View* anchor_view, 297 views::View* anchor_view,
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 // desktop we should link to that here, too. 815 // desktop we should link to that here, too.
814 web_contents_->OpenURL(content::OpenURLParams( 816 web_contents_->OpenURL(content::OpenURLParams(
815 GURL(chrome::kChromeUIContentSettingsURL), content::Referrer(), 817 GURL(chrome::kChromeUIContentSettingsURL), content::Referrer(),
816 NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK, false)); 818 NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK, false));
817 presenter_->RecordWebsiteSettingsAction( 819 presenter_->RecordWebsiteSettingsAction(
818 WebsiteSettings::WEBSITE_SETTINGS_SITE_SETTINGS_OPENED); 820 WebsiteSettings::WEBSITE_SETTINGS_SITE_SETTINGS_OPENED);
819 } else { 821 } else {
820 NOTREACHED(); 822 NOTREACHED();
821 } 823 }
822 } 824 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698