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

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

Issue 1610823003: Migrate call sites LoginDisplayHostImpl::default_host to LoginDisplayHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix-add-supervised-user
Patch Set: Address comments Created 4 years, 11 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
OLDNEW
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/login/base_screen_handler.h" 5 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" 9 #include "chrome/browser/chromeos/login/screens/base_screen.h"
10 #include "chrome/browser/chromeos/login/ui/login_display_host.h"
10 #include "components/login/localized_values_builder.h" 11 #include "components/login/localized_values_builder.h"
11 #include "content/public/browser/web_ui.h" 12 #include "content/public/browser/web_ui.h"
12 #include "ui/base/l10n/l10n_util.h" 13 #include "ui/base/l10n/l10n_util.h"
13 14
14 namespace chromeos { 15 namespace chromeos {
15 16
16 namespace { 17 namespace {
17 const char kMethodContextChanged[] = "contextChanged"; 18 const char kMethodContextChanged[] = "contextChanged";
18 } // namespace 19 } // namespace
19 20
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 if (!web_ui()) 75 if (!web_ui())
75 return; 76 return;
76 base::DictionaryValue screen_params; 77 base::DictionaryValue screen_params;
77 screen_params.SetString("id", screen_name); 78 screen_params.SetString("id", screen_name);
78 if (data) 79 if (data)
79 screen_params.SetWithoutPathExpansion("data", data->DeepCopy()); 80 screen_params.SetWithoutPathExpansion("data", data->DeepCopy());
80 web_ui()->CallJavascriptFunction("cr.ui.Oobe.showScreen", screen_params); 81 web_ui()->CallJavascriptFunction("cr.ui.Oobe.showScreen", screen_params);
81 } 82 }
82 83
83 gfx::NativeWindow BaseScreenHandler::GetNativeWindow() { 84 gfx::NativeWindow BaseScreenHandler::GetNativeWindow() {
84 return LoginDisplayHostImpl::default_host()->GetNativeWindow(); 85 return LoginDisplayHost::default_host()->GetNativeWindow();
85 } 86 }
86 87
87 void BaseScreenHandler::SetBaseScreen(BaseScreen* base_screen) { 88 void BaseScreenHandler::SetBaseScreen(BaseScreen* base_screen) {
88 if (base_screen_ == base_screen) 89 if (base_screen_ == base_screen)
89 return; 90 return;
90 if (base_screen_) 91 if (base_screen_)
91 base_screen_->set_model_view_channel(nullptr); 92 base_screen_->set_model_view_channel(nullptr);
92 base_screen_ = base_screen; 93 base_screen_ = base_screen;
93 if (base_screen_) 94 if (base_screen_)
94 base_screen_->set_model_view_channel(this); 95 base_screen_->set_model_view_channel(this);
95 } 96 }
96 97
97 std::string BaseScreenHandler::FullMethodPath(const std::string& method) const { 98 std::string BaseScreenHandler::FullMethodPath(const std::string& method) const {
98 DCHECK(!method.empty()); 99 DCHECK(!method.empty());
99 return js_screen_path_prefix_ + method; 100 return js_screen_path_prefix_ + method;
100 } 101 }
101 102
102 void BaseScreenHandler::HandleUserAction(const std::string& action_id) { 103 void BaseScreenHandler::HandleUserAction(const std::string& action_id) {
103 if (base_screen_) 104 if (base_screen_)
104 base_screen_->OnUserAction(action_id); 105 base_screen_->OnUserAction(action_id);
105 } 106 }
106 107
107 void BaseScreenHandler::HandleContextChanged( 108 void BaseScreenHandler::HandleContextChanged(
108 const base::DictionaryValue* diff) { 109 const base::DictionaryValue* diff) {
109 if (diff && base_screen_) 110 if (diff && base_screen_)
110 base_screen_->OnContextChanged(*diff); 111 base_screen_->OnContextChanged(*diff);
111 } 112 }
112 113
113 } // namespace chromeos 114 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/system_tray_delegate_chromeos.cc ('k') | chrome/browser/ui/webui/chromeos/login/core_oobe_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698