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

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

Issue 14063017: Move logic in UserImageScreen from UserImageScreenHandler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Whitespaces and braces Created 7 years, 8 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 (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/values.h" 7 #include "base/values.h"
8 #include "chrome/browser/chromeos/login/base_login_display_host.h" 8 #include "chrome/browser/chromeos/login/base_login_display_host.h"
9 #include "content/public/browser/web_ui.h" 9 #include "content/public/browser/web_ui.h"
10 #include "ui/base/l10n/l10n_util.h" 10 #include "ui/base/l10n/l10n_util.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 void BaseScreenHandler::CallJS(const std::string& method) { 73 void BaseScreenHandler::CallJS(const std::string& method) {
74 web_ui()->CallJavascriptFunction(method); 74 web_ui()->CallJavascriptFunction(method);
75 } 75 }
76 76
77 void BaseScreenHandler::CallJS(const std::string& method, 77 void BaseScreenHandler::CallJS(const std::string& method,
78 const base::Value& arg1) { 78 const base::Value& arg1) {
79 web_ui()->CallJavascriptFunction(method, arg1); 79 web_ui()->CallJavascriptFunction(method, arg1);
80 } 80 }
81 81
82 void BaseScreenHandler::CallJS(const std::string& method, 82 void BaseScreenHandler::CallJS(const std::string& method,
83 const std::string& arg1) {
84 base::StringValue value1(arg1);
85 CallJS(method, value1);
86 }
87
88 void BaseScreenHandler::CallJS(const std::string& method,
89 int arg1) {
90 base::FundamentalValue value1(arg1);
91 CallJS(method, value1);
92 }
93
94 void BaseScreenHandler::CallJS(const std::string& method,
95 bool arg1) {
96 base::FundamentalValue value1(arg1);
97 CallJS(method, value1);
98 }
99
100 void BaseScreenHandler::CallJS(const std::string& method,
83 const base::Value& arg1, 101 const base::Value& arg1,
84 const base::Value& arg2) { 102 const base::Value& arg2) {
85 web_ui()->CallJavascriptFunction(method, arg1, arg2); 103 web_ui()->CallJavascriptFunction(method, arg1, arg2);
86 } 104 }
87 105
88 void BaseScreenHandler::CallJS(const std::string& method, 106 void BaseScreenHandler::CallJS(const std::string& method,
89 const base::Value& arg1, 107 const base::Value& arg1,
90 const base::Value& arg2, 108 const base::Value& arg2,
91 const base::Value& arg3) { 109 const base::Value& arg3) {
92 web_ui()->CallJavascriptFunction(method, arg1, arg2, arg3); 110 web_ui()->CallJavascriptFunction(method, arg1, arg2, arg3);
(...skipping 16 matching lines...) Expand all
109 if (data) 127 if (data)
110 screen_params.SetWithoutPathExpansion("data", data->DeepCopy()); 128 screen_params.SetWithoutPathExpansion("data", data->DeepCopy());
111 web_ui()->CallJavascriptFunction("cr.ui.Oobe.showScreen", screen_params); 129 web_ui()->CallJavascriptFunction("cr.ui.Oobe.showScreen", screen_params);
112 } 130 }
113 131
114 gfx::NativeWindow BaseScreenHandler::GetNativeWindow() { 132 gfx::NativeWindow BaseScreenHandler::GetNativeWindow() {
115 return BaseLoginDisplayHost::default_host()->GetNativeWindow(); 133 return BaseLoginDisplayHost::default_host()->GetNativeWindow();
116 } 134 }
117 135
118 } // namespace chromeos 136 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698