| 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 // provided to ensure this bubble is closed when the parent closes. | 160 // provided to ensure this bubble is closed when the parent closes. |
| 161 InternalPageInfoPopupView(views::View* anchor_view, | 161 InternalPageInfoPopupView(views::View* anchor_view, |
| 162 gfx::NativeView parent_window, | 162 gfx::NativeView parent_window, |
| 163 const GURL& url); | 163 const GURL& url); |
| 164 ~InternalPageInfoPopupView() override; | 164 ~InternalPageInfoPopupView() override; |
| 165 | 165 |
| 166 // views::BubbleDialogDelegateView: | 166 // views::BubbleDialogDelegateView: |
| 167 views::NonClientFrameView* CreateNonClientFrameView( | 167 views::NonClientFrameView* CreateNonClientFrameView( |
| 168 views::Widget* widget) override; | 168 views::Widget* widget) override; |
| 169 void OnWidgetDestroying(views::Widget* widget) override; | 169 void OnWidgetDestroying(views::Widget* widget) override; |
| 170 int GetDialogButtons() const override; |
| 170 | 171 |
| 171 private: | 172 private: |
| 172 friend class WebsiteSettingsPopupView; | 173 friend class WebsiteSettingsPopupView; |
| 173 | 174 |
| 174 DISALLOW_COPY_AND_ASSIGN(InternalPageInfoPopupView); | 175 DISALLOW_COPY_AND_ASSIGN(InternalPageInfoPopupView); |
| 175 }; | 176 }; |
| 176 | 177 |
| 177 //////////////////////////////////////////////////////////////////////////////// | 178 //////////////////////////////////////////////////////////////////////////////// |
| 178 // Popup Header | 179 // Popup Header |
| 179 //////////////////////////////////////////////////////////////////////////////// | 180 //////////////////////////////////////////////////////////////////////////////// |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 // 16px padding + half of icon width comes out to 24px. | 390 // 16px padding + half of icon width comes out to 24px. |
| 390 frame->bubble_border()->set_arrow_offset( | 391 frame->bubble_border()->set_arrow_offset( |
| 391 24 + frame->bubble_border()->GetBorderThickness()); | 392 24 + frame->bubble_border()->GetBorderThickness()); |
| 392 return frame; | 393 return frame; |
| 393 } | 394 } |
| 394 | 395 |
| 395 void InternalPageInfoPopupView::OnWidgetDestroying(views::Widget* widget) { | 396 void InternalPageInfoPopupView::OnWidgetDestroying(views::Widget* widget) { |
| 396 is_popup_showing = false; | 397 is_popup_showing = false; |
| 397 } | 398 } |
| 398 | 399 |
| 400 int InternalPageInfoPopupView::GetDialogButtons() const { |
| 401 return ui::DIALOG_BUTTON_NONE; |
| 402 } |
| 403 |
| 399 //////////////////////////////////////////////////////////////////////////////// | 404 //////////////////////////////////////////////////////////////////////////////// |
| 400 // WebsiteSettingsPopupView | 405 // WebsiteSettingsPopupView |
| 401 //////////////////////////////////////////////////////////////////////////////// | 406 //////////////////////////////////////////////////////////////////////////////// |
| 402 | 407 |
| 403 WebsiteSettingsPopupView::~WebsiteSettingsPopupView() { | 408 WebsiteSettingsPopupView::~WebsiteSettingsPopupView() { |
| 404 } | 409 } |
| 405 | 410 |
| 406 // static | 411 // static |
| 407 void WebsiteSettingsPopupView::ShowPopup( | 412 void WebsiteSettingsPopupView::ShowPopup( |
| 408 views::View* anchor_view, | 413 views::View* anchor_view, |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 827 gfx::NativeWindow parent = | 832 gfx::NativeWindow parent = |
| 828 anchor_widget() ? anchor_widget()->GetNativeWindow() : nullptr; | 833 anchor_widget() ? anchor_widget()->GetNativeWindow() : nullptr; |
| 829 presenter_->RecordWebsiteSettingsAction( | 834 presenter_->RecordWebsiteSettingsAction( |
| 830 WebsiteSettings::WEBSITE_SETTINGS_CERTIFICATE_DIALOG_OPENED); | 835 WebsiteSettings::WEBSITE_SETTINGS_CERTIFICATE_DIALOG_OPENED); |
| 831 ShowCertificateViewer(web_contents(), parent, certificate_.get()); | 836 ShowCertificateViewer(web_contents(), parent, certificate_.get()); |
| 832 } else { | 837 } else { |
| 833 DevToolsWindow::OpenDevToolsWindow( | 838 DevToolsWindow::OpenDevToolsWindow( |
| 834 web_contents(), DevToolsToggleAction::ShowSecurityPanel()); | 839 web_contents(), DevToolsToggleAction::ShowSecurityPanel()); |
| 835 } | 840 } |
| 836 } | 841 } |
| OLD | NEW |