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