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

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

Issue 2448943002: Refactor SecurityStateModel/Clients for simplicity and reusability. (Closed)
Patch Set: Remove SecurityStateModel. Created 4 years, 1 month 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <vector> 10 #include <vector>
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 WebsiteSettingsPopupView::~WebsiteSettingsPopupView() { 411 WebsiteSettingsPopupView::~WebsiteSettingsPopupView() {
412 } 412 }
413 413
414 // static 414 // static
415 void WebsiteSettingsPopupView::ShowPopup( 415 void WebsiteSettingsPopupView::ShowPopup(
416 views::View* anchor_view, 416 views::View* anchor_view,
417 const gfx::Rect& anchor_rect, 417 const gfx::Rect& anchor_rect,
418 Profile* profile, 418 Profile* profile,
419 content::WebContents* web_contents, 419 content::WebContents* web_contents,
420 const GURL& url, 420 const GURL& url,
421 const security_state::SecurityStateModel::SecurityInfo& security_info) { 421 const security_state::SecurityInfo& security_info) {
422 gfx::NativeView parent_window = 422 gfx::NativeView parent_window =
423 anchor_view ? nullptr : web_contents->GetNativeView(); 423 anchor_view ? nullptr : web_contents->GetNativeView();
424 if (url.SchemeIs(content::kChromeUIScheme) || 424 if (url.SchemeIs(content::kChromeUIScheme) ||
425 url.SchemeIs(content::kChromeDevToolsScheme) || 425 url.SchemeIs(content::kChromeDevToolsScheme) ||
426 url.SchemeIs(extensions::kExtensionScheme) || 426 url.SchemeIs(extensions::kExtensionScheme) ||
427 url.SchemeIs(content::kViewSourceScheme)) { 427 url.SchemeIs(content::kViewSourceScheme)) {
428 // Use the concrete type so that |SetAnchorRect| can be called as a friend. 428 // Use the concrete type so that |SetAnchorRect| can be called as a friend.
429 InternalPageInfoPopupView* popup = 429 InternalPageInfoPopupView* popup =
430 new InternalPageInfoPopupView(anchor_view, parent_window, url); 430 new InternalPageInfoPopupView(anchor_view, parent_window, url);
431 if (!anchor_view) 431 if (!anchor_view)
(...skipping 13 matching lines...) Expand all
445 WebsiteSettingsPopupView::GetShownPopupType() { 445 WebsiteSettingsPopupView::GetShownPopupType() {
446 return g_shown_popup_type; 446 return g_shown_popup_type;
447 } 447 }
448 448
449 WebsiteSettingsPopupView::WebsiteSettingsPopupView( 449 WebsiteSettingsPopupView::WebsiteSettingsPopupView(
450 views::View* anchor_view, 450 views::View* anchor_view,
451 gfx::NativeView parent_window, 451 gfx::NativeView parent_window,
452 Profile* profile, 452 Profile* profile,
453 content::WebContents* web_contents, 453 content::WebContents* web_contents,
454 const GURL& url, 454 const GURL& url,
455 const security_state::SecurityStateModel::SecurityInfo& security_info) 455 const security_state::SecurityInfo& security_info)
456 : content::WebContentsObserver(web_contents), 456 : content::WebContentsObserver(web_contents),
457 BubbleDialogDelegateView(anchor_view, views::BubbleBorder::TOP_LEFT), 457 BubbleDialogDelegateView(anchor_view, views::BubbleBorder::TOP_LEFT),
458 profile_(profile), 458 profile_(profile),
459 header_(nullptr), 459 header_(nullptr),
460 separator_(nullptr), 460 separator_(nullptr),
461 site_settings_view_(nullptr), 461 site_settings_view_(nullptr),
462 cookies_view_(nullptr), 462 cookies_view_(nullptr),
463 cookie_dialog_link_(nullptr), 463 cookie_dialog_link_(nullptr),
464 permissions_view_(nullptr), 464 permissions_view_(nullptr),
465 weak_factory_(this) { 465 weak_factory_(this) {
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 } 802 }
803 break; 803 break;
804 case STYLED_LABEL_RESET_CERTIFICATE_DECISIONS: 804 case STYLED_LABEL_RESET_CERTIFICATE_DECISIONS:
805 presenter_->OnRevokeSSLErrorBypassButtonPressed(); 805 presenter_->OnRevokeSSLErrorBypassButtonPressed();
806 GetWidget()->Close(); 806 GetWidget()->Close();
807 break; 807 break;
808 default: 808 default:
809 NOTREACHED(); 809 NOTREACHED();
810 } 810 }
811 } 811 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698