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

Side by Side Diff: chrome/browser/chromeos/attestation/platform_verification_dialog.cc

Issue 63343004: Remove DialogDelegate::UseNewStyle and unused code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Restore [D]CHECKs and loop scoping. Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/chromeos/attestation/platform_verification_dialog.h" 5 #include "chrome/browser/chromeos/attestation/platform_verification_dialog.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/ui/browser_finder.h" 8 #include "chrome/browser/ui/browser_finder.h"
9 #include "chrome/browser/ui/browser_window.h" 9 #include "chrome/browser/ui/browser_window.h"
10 #include "chrome/browser/ui/singleton_tabs.h" 10 #include "chrome/browser/ui/singleton_tabs.h"
11 #include "chrome/common/url_constants.h" 11 #include "chrome/common/url_constants.h"
12 #include "components/web_modal/web_contents_modal_dialog_host.h" 12 #include "components/web_modal/web_contents_modal_dialog_host.h"
13 #include "components/web_modal/web_contents_modal_dialog_manager.h" 13 #include "components/web_modal/web_contents_modal_dialog_manager.h"
14 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h" 14 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h"
15 #include "content/public/browser/web_contents.h" 15 #include "content/public/browser/web_contents.h"
16 #include "content/public/browser/web_contents_view.h"
17 #include "grit/generated_resources.h" 16 #include "grit/generated_resources.h"
18 #include "ui/aura/window.h" 17 #include "ui/aura/window.h"
19 #include "ui/base/l10n/l10n_util.h" 18 #include "ui/base/l10n/l10n_util.h"
20 #include "ui/views/border.h" 19 #include "ui/views/border.h"
21 #include "ui/views/controls/styled_label.h" 20 #include "ui/views/controls/styled_label.h"
22 #include "ui/views/layout/fill_layout.h" 21 #include "ui/views/layout/fill_layout.h"
23 #include "ui/views/layout/layout_constants.h" 22 #include "ui/views/layout/layout_constants.h"
24 #include "ui/views/widget/widget.h" 23 #include "ui/views/widget/widget.h"
25 24
26 namespace chromeos { 25 namespace chromeos {
(...skipping 15 matching lines...) Expand all
42 chrome::FindBrowserWithWebContents(web_contents), 41 chrome::FindBrowserWithWebContents(web_contents),
43 UTF8ToUTF16(origin), 42 UTF8ToUTF16(origin),
44 callback); 43 callback);
45 44
46 // Sets up the dialog widget and shows it. 45 // Sets up the dialog widget and shows it.
47 web_modal::WebContentsModalDialogManager* web_contents_modal_dialog_manager = 46 web_modal::WebContentsModalDialogManager* web_contents_modal_dialog_manager =
48 web_modal::WebContentsModalDialogManager::FromWebContents(web_contents); 47 web_modal::WebContentsModalDialogManager::FromWebContents(web_contents);
49 web_modal::WebContentsModalDialogManagerDelegate* modal_delegate = 48 web_modal::WebContentsModalDialogManagerDelegate* modal_delegate =
50 web_contents_modal_dialog_manager->delegate(); 49 web_contents_modal_dialog_manager->delegate();
51 views::Widget* widget = views::Widget::CreateWindowAsFramelessChild( 50 views::Widget* widget = views::Widget::CreateWindowAsFramelessChild(
52 dialog, web_contents->GetView()->GetNativeView(), 51 dialog, modal_delegate->GetWebContentsModalDialogHost()->GetHostView());
53 modal_delegate->GetWebContentsModalDialogHost()->GetHostView());
54 web_contents_modal_dialog_manager->ShowDialog(widget->GetNativeView()); 52 web_contents_modal_dialog_manager->ShowDialog(widget->GetNativeView());
55 widget->Show(); 53 widget->Show();
56 } 54 }
57 55
58 PlatformVerificationDialog::~PlatformVerificationDialog() { 56 PlatformVerificationDialog::~PlatformVerificationDialog() {
59 } 57 }
60 58
61 PlatformVerificationDialog::PlatformVerificationDialog( 59 PlatformVerificationDialog::PlatformVerificationDialog(
62 Browser* browser, 60 Browser* browser,
63 const base::string16& domain, 61 const base::string16& domain,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 } 111 }
114 112
115 void PlatformVerificationDialog::StyledLabelLinkClicked(const gfx::Range& range, 113 void PlatformVerificationDialog::StyledLabelLinkClicked(const gfx::Range& range,
116 int event_flags) { 114 int event_flags) {
117 chrome::ShowSingletonTab(browser_, GURL( 115 chrome::ShowSingletonTab(browser_, GURL(
118 chrome::kAttestationForContentProtectionLearnMoreURL)); 116 chrome::kAttestationForContentProtectionLearnMoreURL));
119 } 117 }
120 118
121 } // namespace attestation 119 } // namespace attestation
122 } // namespace chromeos 120 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/app/theme/theme_resources.grd ('k') | chrome/browser/chromeos/login/captive_portal_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698