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

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

Issue 287123002: [WebModals] New API for browser-scoped popup management. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make PopupManager a thin API for WCMDM Created 6 years, 6 months 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/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/browser_finder.h" 9 #include "chrome/browser/ui/browser_finder.h"
10 #include "chrome/browser/ui/browser_navigator.h" 10 #include "chrome/browser/ui/browser_navigator.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 extensions::ExtensionRegistry::Get(web_contents->GetBrowserContext())-> 47 extensions::ExtensionRegistry::Get(web_contents->GetBrowserContext())->
48 enabled_extensions().GetExtensionOrAppByURL(url); 48 enabled_extensions().GetExtensionOrAppByURL(url);
49 std::string origin = extension ? extension->name() : url.GetOrigin().spec(); 49 std::string origin = extension ? extension->name() : url.GetOrigin().spec();
50 50
51 PlatformVerificationDialog* dialog = new PlatformVerificationDialog( 51 PlatformVerificationDialog* dialog = new PlatformVerificationDialog(
52 web_contents, 52 web_contents,
53 base::UTF8ToUTF16(origin), 53 base::UTF8ToUTF16(origin),
54 callback); 54 callback);
55 55
56 // Sets up the dialog widget and shows it. 56 // Sets up the dialog widget and shows it.
57 // TODO(gbillock): Use PopupManager here.
57 web_modal::WebContentsModalDialogManager* web_contents_modal_dialog_manager = 58 web_modal::WebContentsModalDialogManager* web_contents_modal_dialog_manager =
58 web_modal::WebContentsModalDialogManager::FromWebContents(web_contents); 59 web_modal::WebContentsModalDialogManager::FromWebContents(web_contents);
59 web_modal::WebContentsModalDialogManagerDelegate* modal_delegate = 60 web_modal::WebContentsModalDialogManagerDelegate* modal_delegate =
60 web_contents_modal_dialog_manager->delegate(); 61 web_contents_modal_dialog_manager->delegate();
61 views::Widget* widget = views::Widget::CreateWindowAsFramelessChild( 62 views::Widget* widget = views::Widget::CreateWindowAsFramelessChild(
62 dialog, modal_delegate->GetWebContentsModalDialogHost()->GetHostView()); 63 dialog, modal_delegate->GetWebContentsModalDialogHost()->GetHostView());
63 web_contents_modal_dialog_manager->ShowModalDialog( 64 web_contents_modal_dialog_manager->ShowModalDialog(
64 widget->GetNativeView()); 65 widget->GetNativeView());
65 widget->Show(); 66 widget->Show();
66 } 67 }
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 profile, learn_more_url, content::PAGE_TRANSITION_LINK); 144 profile, learn_more_url, content::PAGE_TRANSITION_LINK);
144 params.disposition = SINGLETON_TAB; 145 params.disposition = SINGLETON_TAB;
145 chrome::Navigate(&params); 146 chrome::Navigate(&params);
146 } else { 147 } else {
147 chrome::ShowSingletonTab(browser, learn_more_url); 148 chrome::ShowSingletonTab(browser, learn_more_url);
148 } 149 }
149 } 150 }
150 151
151 } // namespace attestation 152 } // namespace attestation
152 } // namespace chromeos 153 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/ui/captive_portal_window_proxy.cc » ('j') | components/web_modal/popup_manager.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698