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/webui/chromeos/mobile_setup_dialog.h" | 5 #include "chrome/browser/ui/webui/chromeos/mobile_setup_dialog.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/browser_shutdown.h" | 10 #include "chrome/browser/browser_shutdown.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
91 gfx::NativeWindow parent = NULL; | 91 gfx::NativeWindow parent = NULL; |
92 // If we're on the login screen. | 92 // If we're on the login screen. |
93 if (chromeos::LoginDisplayHostImpl::default_host()) { | 93 if (chromeos::LoginDisplayHostImpl::default_host()) { |
94 chromeos::LoginDisplayHostImpl* webui_host = | 94 chromeos::LoginDisplayHostImpl* webui_host = |
95 static_cast<chromeos::LoginDisplayHostImpl*>( | 95 static_cast<chromeos::LoginDisplayHostImpl*>( |
96 chromeos::LoginDisplayHostImpl::default_host()); | 96 chromeos::LoginDisplayHostImpl::default_host()); |
97 chromeos::WebUILoginView* login_view = webui_host->GetWebUILoginView(); | 97 chromeos::WebUILoginView* login_view = webui_host->GetWebUILoginView(); |
98 if (login_view) | 98 if (login_view) |
99 parent = login_view->GetNativeWindow(); | 99 parent = login_view->GetNativeWindow(); |
100 } | 100 } |
101 | 101 // Only the primary user can change this. |
Nikita (slow)
2013/12/23 12:12:22
nit: Are you sure that this is enforced?
Mr4D (OOO till 08-26)
2014/01/07 23:29:35
Since we use the primary's settings here any user
| |
102 dialog_window_ = chrome::ShowWebDialog( | 102 dialog_window_ = chrome::ShowWebDialog( |
103 parent, | 103 parent, |
104 ProfileManager::GetDefaultProfileOrOffTheRecord(), | 104 ProfileManager::GetPrimaryUserProfile(), |
105 this); | 105 this); |
106 } | 106 } |
107 | 107 |
108 ui::ModalType MobileSetupDialogDelegate::GetDialogModalType() const { | 108 ui::ModalType MobileSetupDialogDelegate::GetDialogModalType() const { |
109 return ui::MODAL_TYPE_SYSTEM; | 109 return ui::MODAL_TYPE_SYSTEM; |
110 } | 110 } |
111 | 111 |
112 base::string16 MobileSetupDialogDelegate::GetDialogTitle() const { | 112 base::string16 MobileSetupDialogDelegate::GetDialogTitle() const { |
113 return l10n_util::GetStringUTF16(IDS_MOBILE_SETUP_TITLE); | 113 return l10n_util::GetStringUTF16(IDS_MOBILE_SETUP_TITLE); |
114 } | 114 } |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
160 } | 160 } |
161 | 161 |
162 bool MobileSetupDialogDelegate::ShouldShowDialogTitle() const { | 162 bool MobileSetupDialogDelegate::ShouldShowDialogTitle() const { |
163 return true; | 163 return true; |
164 } | 164 } |
165 | 165 |
166 bool MobileSetupDialogDelegate::HandleContextMenu( | 166 bool MobileSetupDialogDelegate::HandleContextMenu( |
167 const content::ContextMenuParams& params) { | 167 const content::ContextMenuParams& params) { |
168 return true; | 168 return true; |
169 } | 169 } |
OLD | NEW |