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