| 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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 WebsiteSettingsPopupView::~WebsiteSettingsPopupView() { | 341 WebsiteSettingsPopupView::~WebsiteSettingsPopupView() { |
| 342 } | 342 } |
| 343 | 343 |
| 344 // static | 344 // static |
| 345 void WebsiteSettingsPopupView::ShowPopup( | 345 void WebsiteSettingsPopupView::ShowPopup( |
| 346 views::View* anchor_view, | 346 views::View* anchor_view, |
| 347 const gfx::Rect& anchor_rect, | 347 const gfx::Rect& anchor_rect, |
| 348 Profile* profile, | 348 Profile* profile, |
| 349 content::WebContents* web_contents, | 349 content::WebContents* web_contents, |
| 350 const GURL& url, | 350 const GURL& url, |
| 351 const SecurityStateModel::SecurityInfo& security_info) { | 351 const security_state::SecurityStateModel::SecurityInfo& security_info) { |
| 352 is_popup_showing = true; | 352 is_popup_showing = true; |
| 353 gfx::NativeView parent_window = | 353 gfx::NativeView parent_window = |
| 354 anchor_view ? nullptr : web_contents->GetNativeView(); | 354 anchor_view ? nullptr : web_contents->GetNativeView(); |
| 355 if (InternalChromePage(url)) { | 355 if (InternalChromePage(url)) { |
| 356 // Use the concrete type so that |SetAnchorRect| can be called as a friend. | 356 // Use the concrete type so that |SetAnchorRect| can be called as a friend. |
| 357 InternalPageInfoPopupView* popup = | 357 InternalPageInfoPopupView* popup = |
| 358 new InternalPageInfoPopupView(anchor_view, parent_window); | 358 new InternalPageInfoPopupView(anchor_view, parent_window); |
| 359 if (!anchor_view) | 359 if (!anchor_view) |
| 360 popup->SetAnchorRect(anchor_rect); | 360 popup->SetAnchorRect(anchor_rect); |
| 361 popup->GetWidget()->Show(); | 361 popup->GetWidget()->Show(); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 372 bool WebsiteSettingsPopupView::IsPopupShowing() { | 372 bool WebsiteSettingsPopupView::IsPopupShowing() { |
| 373 return is_popup_showing; | 373 return is_popup_showing; |
| 374 } | 374 } |
| 375 | 375 |
| 376 WebsiteSettingsPopupView::WebsiteSettingsPopupView( | 376 WebsiteSettingsPopupView::WebsiteSettingsPopupView( |
| 377 views::View* anchor_view, | 377 views::View* anchor_view, |
| 378 gfx::NativeView parent_window, | 378 gfx::NativeView parent_window, |
| 379 Profile* profile, | 379 Profile* profile, |
| 380 content::WebContents* web_contents, | 380 content::WebContents* web_contents, |
| 381 const GURL& url, | 381 const GURL& url, |
| 382 const SecurityStateModel::SecurityInfo& security_info) | 382 const security_state::SecurityStateModel::SecurityInfo& security_info) |
| 383 : content::WebContentsObserver(web_contents), | 383 : content::WebContentsObserver(web_contents), |
| 384 BubbleDelegateView(anchor_view, views::BubbleBorder::TOP_LEFT), | 384 BubbleDelegateView(anchor_view, views::BubbleBorder::TOP_LEFT), |
| 385 web_contents_(web_contents), | 385 web_contents_(web_contents), |
| 386 header_(nullptr), | 386 header_(nullptr), |
| 387 tabbed_pane_(nullptr), | 387 tabbed_pane_(nullptr), |
| 388 permissions_tab_(nullptr), | 388 permissions_tab_(nullptr), |
| 389 site_data_content_(nullptr), | 389 site_data_content_(nullptr), |
| 390 cookie_dialog_link_(nullptr), | 390 cookie_dialog_link_(nullptr), |
| 391 permissions_content_(nullptr), | 391 permissions_content_(nullptr), |
| 392 connection_tab_(nullptr), | 392 connection_tab_(nullptr), |
| (...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 928 } | 928 } |
| 929 | 929 |
| 930 void WebsiteSettingsPopupView::StyledLabelLinkClicked(views::StyledLabel* label, | 930 void WebsiteSettingsPopupView::StyledLabelLinkClicked(views::StyledLabel* label, |
| 931 const gfx::Range& range, | 931 const gfx::Range& range, |
| 932 int event_flags) { | 932 int event_flags) { |
| 933 presenter_->RecordWebsiteSettingsAction( | 933 presenter_->RecordWebsiteSettingsAction( |
| 934 WebsiteSettings::WEBSITE_SETTINGS_SECURITY_DETAILS_OPENED); | 934 WebsiteSettings::WEBSITE_SETTINGS_SECURITY_DETAILS_OPENED); |
| 935 DevToolsWindow::OpenDevToolsWindow(web_contents_, | 935 DevToolsWindow::OpenDevToolsWindow(web_contents_, |
| 936 DevToolsToggleAction::ShowSecurityPanel()); | 936 DevToolsToggleAction::ShowSecurityPanel()); |
| 937 } | 937 } |
| OLD | NEW |