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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h

Issue 2505403003: TouchView Mojom (Closed)
Patch Set: Dont export for Windows Created 4 years 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <set> 10 #include <set>
11 #include <string> 11 #include <string>
12 12
13 #include "ash/public/interfaces/touch_view.mojom.h"
13 #include "base/callback.h" 14 #include "base/callback.h"
14 #include "base/compiler_specific.h" 15 #include "base/compiler_specific.h"
15 #include "base/containers/hash_tables.h" 16 #include "base/containers/hash_tables.h"
16 #include "base/macros.h" 17 #include "base/macros.h"
17 #include "base/memory/ref_counted.h" 18 #include "base/memory/ref_counted.h"
18 #include "base/memory/weak_ptr.h" 19 #include "base/memory/weak_ptr.h"
19 #include "chrome/browser/chromeos/login/screens/network_error_model.h" 20 #include "chrome/browser/chromeos/login/screens/network_error_model.h"
20 #include "chrome/browser/chromeos/login/signin_specifics.h" 21 #include "chrome/browser/chromeos/login/signin_specifics.h"
21 #include "chrome/browser/chromeos/login/ui/login_display.h" 22 #include "chrome/browser/chromeos/login/ui/login_display.h"
22 #include "chrome/browser/chromeos/settings/cros_settings.h" 23 #include "chrome/browser/chromeos/settings/cros_settings.h"
23 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" 24 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h"
24 #include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h" 25 #include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h"
25 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" 26 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
26 #include "chrome/browser/ui/webui/chromeos/touch_view_controller_delegate.h"
27 #include "chromeos/dbus/power_manager_client.h" 27 #include "chromeos/dbus/power_manager_client.h"
28 #include "chromeos/network/portal_detector/network_portal_detector.h" 28 #include "chromeos/network/portal_detector/network_portal_detector.h"
29 #include "components/proximity_auth/screenlock_bridge.h" 29 #include "components/proximity_auth/screenlock_bridge.h"
30 #include "components/user_manager/user_manager.h" 30 #include "components/user_manager/user_manager.h"
31 #include "content/public/browser/notification_observer.h" 31 #include "content/public/browser/notification_observer.h"
32 #include "content/public/browser/notification_registrar.h" 32 #include "content/public/browser/notification_registrar.h"
33 #include "content/public/browser/web_ui.h" 33 #include "content/public/browser/web_ui.h"
34 #include "mojo/public/cpp/bindings/binding.h"
34 #include "net/base/net_errors.h" 35 #include "net/base/net_errors.h"
35 #include "ui/base/ime/chromeos/ime_keyboard.h" 36 #include "ui/base/ime/chromeos/ime_keyboard.h"
36 #include "ui/base/ime/chromeos/input_method_manager.h" 37 #include "ui/base/ime/chromeos/input_method_manager.h"
37 #include "ui/events/event_handler.h" 38 #include "ui/events/event_handler.h"
38 39
39 class AccountId; 40 class AccountId;
40 41
41 namespace base { 42 namespace base {
42 class DictionaryValue; 43 class DictionaryValue;
43 class ListValue; 44 class ListValue;
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 211
211 // A class that handles the WebUI hooks in sign-in screen in OobeUI and 212 // A class that handles the WebUI hooks in sign-in screen in OobeUI and
212 // LoginDisplay. 213 // LoginDisplay.
213 class SigninScreenHandler 214 class SigninScreenHandler
214 : public BaseScreenHandler, 215 : public BaseScreenHandler,
215 public LoginDisplayWebUIHandler, 216 public LoginDisplayWebUIHandler,
216 public content::NotificationObserver, 217 public content::NotificationObserver,
217 public NetworkStateInformer::NetworkStateInformerObserver, 218 public NetworkStateInformer::NetworkStateInformerObserver,
218 public PowerManagerClient::Observer, 219 public PowerManagerClient::Observer,
219 public input_method::ImeKeyboard::Observer, 220 public input_method::ImeKeyboard::Observer,
220 public TouchViewControllerDelegate::Observer, 221 public ash::mojom::TouchViewObserver,
221 public OobeUI::Observer { 222 public OobeUI::Observer {
222 public: 223 public:
223 SigninScreenHandler( 224 SigninScreenHandler(
224 const scoped_refptr<NetworkStateInformer>& network_state_informer, 225 const scoped_refptr<NetworkStateInformer>& network_state_informer,
225 NetworkErrorModel* network_error_model, 226 NetworkErrorModel* network_error_model,
226 CoreOobeActor* core_oobe_actor, 227 CoreOobeActor* core_oobe_actor,
227 GaiaScreenHandler* gaia_screen_handler); 228 GaiaScreenHandler* gaia_screen_handler);
228 ~SigninScreenHandler() override; 229 ~SigninScreenHandler() override;
229 230
230 static std::string GetUserLRUInputMethod(const std::string& username); 231 static std::string GetUserLRUInputMethod(const std::string& username);
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 void LoadUsers(const base::ListValue& users_list, bool show_guest) override; 321 void LoadUsers(const base::ListValue& users_list, bool show_guest) override;
321 322
322 // content::NotificationObserver implementation: 323 // content::NotificationObserver implementation:
323 void Observe(int type, 324 void Observe(int type,
324 const content::NotificationSource& source, 325 const content::NotificationSource& source,
325 const content::NotificationDetails& details) override; 326 const content::NotificationDetails& details) override;
326 327
327 // PowerManagerClient::Observer implementation: 328 // PowerManagerClient::Observer implementation:
328 void SuspendDone(const base::TimeDelta& sleep_duration) override; 329 void SuspendDone(const base::TimeDelta& sleep_duration) override;
329 330
330 // TouchViewControllerDelegate::Observer implementation: 331 // ash::mojom::TouchView:
331 void OnMaximizeModeStarted() override; 332 void OnTouchViewChanged(bool enabled) override;
332 void OnMaximizeModeEnded() override;
333 333
334 void UpdateAddButtonStatus(); 334 void UpdateAddButtonStatus();
335 335
336 // Restore input focus to current user pod. 336 // Restore input focus to current user pod.
337 void RefocusCurrentPod(); 337 void RefocusCurrentPod();
338 338
339 // Hides the PIN keyboard if it is no longer available. 339 // Hides the PIN keyboard if it is no longer available.
340 void HidePinKeyboardIfNeeded(const AccountId& account_id); 340 void HidePinKeyboardIfNeeded(const AccountId& account_id);
341 341
342 // WebUI message handlers. 342 // WebUI message handlers.
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 int proxy_auth_dialog_reload_times_; 485 int proxy_auth_dialog_reload_times_;
486 486
487 // True if we need to reload gaia page to bring back "Proxy authentication" 487 // True if we need to reload gaia page to bring back "Proxy authentication"
488 // dialog. 488 // dialog.
489 bool proxy_auth_dialog_need_reload_ = false; 489 bool proxy_auth_dialog_need_reload_ = false;
490 490
491 // Non-owning ptr. 491 // Non-owning ptr.
492 // TODO(antrim@): remove this dependency. 492 // TODO(antrim@): remove this dependency.
493 GaiaScreenHandler* gaia_screen_handler_ = nullptr; 493 GaiaScreenHandler* gaia_screen_handler_ = nullptr;
494 494
495 // Maximized mode controller delegate. 495 mojo::Binding<ash::mojom::TouchViewObserver> touch_view_binding_;
James Cook 2016/12/01 16:55:09 I like that you called this touch_view_binding_ an
496 std::unique_ptr<TouchViewControllerDelegate> max_mode_delegate_; 496 ash::mojom::TouchViewManagerPtr touch_view_manager_ptr_;
497 bool touch_view_enabled_;
497 498
498 // Input Method Engine state used at signin screen. 499 // Input Method Engine state used at signin screen.
499 scoped_refptr<input_method::InputMethodManager::State> ime_state_; 500 scoped_refptr<input_method::InputMethodManager::State> ime_state_;
500 501
501 // This callback captures "focusPod finished" event for tests. 502 // This callback captures "focusPod finished" event for tests.
502 base::Closure test_focus_pod_callback_; 503 base::Closure test_focus_pod_callback_;
503 504
504 // True if SigninScreenHandler has already been added to OobeUI observers. 505 // True if SigninScreenHandler has already been added to OobeUI observers.
505 bool oobe_ui_observer_added_ = false; 506 bool oobe_ui_observer_added_ = false;
506 507
507 bool zero_offline_timeout_for_test_ = false; 508 bool zero_offline_timeout_for_test_ = false;
508 509
509 std::unique_ptr<ErrorScreensHistogramHelper> histogram_helper_; 510 std::unique_ptr<ErrorScreensHistogramHelper> histogram_helper_;
510 511
511 std::unique_ptr<LoginFeedback> login_feedback_; 512 std::unique_ptr<LoginFeedback> login_feedback_;
512 513
513 base::WeakPtrFactory<SigninScreenHandler> weak_factory_; 514 base::WeakPtrFactory<SigninScreenHandler> weak_factory_;
514 515
515 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); 516 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler);
516 }; 517 };
517 518
518 } // namespace chromeos 519 } // namespace chromeos
519 520
520 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ 521 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698