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

Side by Side Diff: chrome/browser/chromeos/login/ui/login_display_host_impl.cc

Issue 317093002: Show confirmation dialog for unsecure signin (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/login/ui/login_display_host_impl.h" 5 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/audio/sounds.h" 9 #include "ash/audio/sounds.h"
10 #include "ash/desktop_background/desktop_background_controller.h" 10 #include "ash/desktop_background/desktop_background_controller.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 #include "chromeos/chromeos_switches.h" 65 #include "chromeos/chromeos_switches.h"
66 #include "chromeos/dbus/dbus_thread_manager.h" 66 #include "chromeos/dbus/dbus_thread_manager.h"
67 #include "chromeos/dbus/session_manager_client.h" 67 #include "chromeos/dbus/session_manager_client.h"
68 #include "chromeos/ime/extension_ime_util.h" 68 #include "chromeos/ime/extension_ime_util.h"
69 #include "chromeos/ime/input_method_manager.h" 69 #include "chromeos/ime/input_method_manager.h"
70 #include "chromeos/login/login_state.h" 70 #include "chromeos/login/login_state.h"
71 #include "chromeos/settings/timezone_settings.h" 71 #include "chromeos/settings/timezone_settings.h"
72 #include "components/session_manager/core/session_manager.h" 72 #include "components/session_manager/core/session_manager.h"
73 #include "content/public/browser/notification_service.h" 73 #include "content/public/browser/notification_service.h"
74 #include "content/public/browser/notification_types.h" 74 #include "content/public/browser/notification_types.h"
75 #include "content/public/browser/render_frame_host.h"
76 #include "content/public/browser/web_contents.h" 75 #include "content/public/browser/web_contents.h"
77 #include "content/public/browser/web_ui.h" 76 #include "content/public/browser/web_ui.h"
78 #include "media/audio/sounds/sounds_manager.h" 77 #include "media/audio/sounds/sounds_manager.h"
79 #include "ui/aura/window.h" 78 #include "ui/aura/window.h"
80 #include "ui/base/resource/resource_bundle.h" 79 #include "ui/base/resource/resource_bundle.h"
81 #include "ui/base/ui_base_switches_util.h" 80 #include "ui/base/ui_base_switches_util.h"
82 #include "ui/compositor/layer.h" 81 #include "ui/compositor/layer.h"
83 #include "ui/compositor/layer_animation_observer.h" 82 #include "ui/compositor/layer_animation_observer.h"
84 #include "ui/compositor/scoped_layer_animation_settings.h" 83 #include "ui/compositor/scoped_layer_animation_settings.h"
85 #include "ui/events/event_utils.h" 84 #include "ui/events/event_utils.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 LOG(WARNING) << "Locale could not be found for '" << locale << "'"; 200 LOG(WARNING) << "Locale could not be found for '" << locale << "'";
202 201
203 ShowLoginWizardFinish( 202 ShowLoginWizardFinish(
204 self->first_screen_name, self->startup_manifest, self->display_host); 203 self->first_screen_name, self->startup_manifest, self->display_host);
205 } 204 }
206 205
207 void EnableSystemSoundsForAccessibility() { 206 void EnableSystemSoundsForAccessibility() {
208 chromeos::AccessibilityManager::Get()->EnableSystemSounds(true); 207 chromeos::AccessibilityManager::Get()->EnableSystemSounds(true);
209 } 208 }
210 209
211 void AddToSetIfIsGaiaAuthIframe(std::set<content::RenderFrameHost*>* frame_set,
212 content::RenderFrameHost* frame) {
213 content::RenderFrameHost* parent = frame->GetParent();
214 if (parent && parent->GetFrameName() == "signin-frame")
215 frame_set->insert(frame);
216 }
217
218 // A login implementation of WidgetDelegate. 210 // A login implementation of WidgetDelegate.
219 class LoginWidgetDelegate : public views::WidgetDelegate { 211 class LoginWidgetDelegate : public views::WidgetDelegate {
220 public: 212 public:
221 explicit LoginWidgetDelegate(views::Widget* widget) : widget_(widget) { 213 explicit LoginWidgetDelegate(views::Widget* widget) : widget_(widget) {
222 } 214 }
223 virtual ~LoginWidgetDelegate() {} 215 virtual ~LoginWidgetDelegate() {}
224 216
225 // Overridden from WidgetDelegate: 217 // Overridden from WidgetDelegate:
226 virtual void DeleteDelegate() OVERRIDE { 218 virtual void DeleteDelegate() OVERRIDE {
227 delete this; 219 delete this;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 } // namespace 252 } // namespace
261 253
262 namespace chromeos { 254 namespace chromeos {
263 255
264 // static 256 // static
265 LoginDisplayHost* LoginDisplayHostImpl::default_host_ = NULL; 257 LoginDisplayHost* LoginDisplayHostImpl::default_host_ = NULL;
266 258
267 // static 259 // static
268 const int LoginDisplayHostImpl::kShowLoginWebUIid = 0x1111; 260 const int LoginDisplayHostImpl::kShowLoginWebUIid = 0x1111;
269 261
270 // static
271 content::RenderFrameHost* LoginDisplayHostImpl::GetGaiaAuthIframe(
272 content::WebContents* web_contents) {
273 std::set<content::RenderFrameHost*> frame_set;
274 web_contents->ForEachFrame(
275 base::Bind(&AddToSetIfIsGaiaAuthIframe, &frame_set));
276 DCHECK_EQ(1U, frame_set.size());
277 return *frame_set.begin();
278 }
279
280 //////////////////////////////////////////////////////////////////////////////// 262 ////////////////////////////////////////////////////////////////////////////////
281 // LoginDisplayHostImpl, public 263 // LoginDisplayHostImpl, public
282 264
283 LoginDisplayHostImpl::LoginDisplayHostImpl(const gfx::Rect& background_bounds) 265 LoginDisplayHostImpl::LoginDisplayHostImpl(const gfx::Rect& background_bounds)
284 : background_bounds_(background_bounds), 266 : background_bounds_(background_bounds),
285 pointer_factory_(this), 267 pointer_factory_(this),
286 shutting_down_(false), 268 shutting_down_(false),
287 oobe_progress_bar_visible_(false), 269 oobe_progress_bar_visible_(false),
288 session_starting_(false), 270 session_starting_(false),
289 login_window_(NULL), 271 login_window_(NULL),
(...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after
1274 scoped_ptr<locale_util::SwitchLanguageCallback> callback( 1256 scoped_ptr<locale_util::SwitchLanguageCallback> callback(
1275 new locale_util::SwitchLanguageCallback( 1257 new locale_util::SwitchLanguageCallback(
1276 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())))); 1258 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass()))));
1277 1259
1278 // Load locale keyboards here. Hardware layout would be automatically enabled. 1260 // Load locale keyboards here. Hardware layout would be automatically enabled.
1279 locale_util::SwitchLanguage( 1261 locale_util::SwitchLanguage(
1280 locale, true, true /* login_layouts_only */, callback.Pass()); 1262 locale, true, true /* login_layouts_only */, callback.Pass());
1281 } 1263 }
1282 1264
1283 } // namespace chromeos 1265 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698