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

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

Issue 252503002: Base version of HID detection OOBE screen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Proper initialization and setPower of BT adapter. Created 6 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/logging.h" 7 #include "base/logging.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/chromeos/login/login_display_host_impl.h" 9 #include "chrome/browser/chromeos/login/login_display_host_impl.h"
10 #include "content/public/browser/web_ui.h" 10 #include "content/public/browser/web_ui.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 void BaseScreenHandler::GetLocalizedStrings(base::DictionaryValue* dict) { 82 void BaseScreenHandler::GetLocalizedStrings(base::DictionaryValue* dict) {
83 scoped_ptr<LocalizedValuesBuilder> builder(new LocalizedValuesBuilder(dict)); 83 scoped_ptr<LocalizedValuesBuilder> builder(new LocalizedValuesBuilder(dict));
84 DeclareLocalizedValues(builder.get()); 84 DeclareLocalizedValues(builder.get());
85 GetAdditionalParameters(dict); 85 GetAdditionalParameters(dict);
86 } 86 }
87 87
88 void BaseScreenHandler::GetAdditionalParameters(base::DictionaryValue* dict) { 88 void BaseScreenHandler::GetAdditionalParameters(base::DictionaryValue* dict) {
89 } 89 }
90 90
91 void BaseScreenHandler::CallJS(const std::string& method) { 91 void BaseScreenHandler::CallJS(const std::string& method) {
92 LOG(ERROR) << FullMethodPath(method);
dzhioev (left Google) 2014/04/25 10:59:59 Remove this.
merkulova 2014/04/25 11:37:20 Done.
92 web_ui()->CallJavascriptFunction(FullMethodPath(method)); 93 web_ui()->CallJavascriptFunction(FullMethodPath(method));
93 } 94 }
94 95
95 void BaseScreenHandler::ShowScreen(const char* screen_name, 96 void BaseScreenHandler::ShowScreen(const char* screen_name,
96 const base::DictionaryValue* data) { 97 const base::DictionaryValue* data) {
97 if (!web_ui()) 98 if (!web_ui())
98 return; 99 return;
99 base::DictionaryValue screen_params; 100 base::DictionaryValue screen_params;
100 screen_params.SetString("id", screen_name); 101 screen_params.SetString("id", screen_name);
101 if (data) 102 if (data)
102 screen_params.SetWithoutPathExpansion("data", data->DeepCopy()); 103 screen_params.SetWithoutPathExpansion("data", data->DeepCopy());
103 web_ui()->CallJavascriptFunction("cr.ui.Oobe.showScreen", screen_params); 104 web_ui()->CallJavascriptFunction("cr.ui.Oobe.showScreen", screen_params);
104 } 105 }
105 106
106 gfx::NativeWindow BaseScreenHandler::GetNativeWindow() { 107 gfx::NativeWindow BaseScreenHandler::GetNativeWindow() {
107 return LoginDisplayHostImpl::default_host()->GetNativeWindow(); 108 return LoginDisplayHostImpl::default_host()->GetNativeWindow();
108 } 109 }
109 110
110 std::string BaseScreenHandler::FullMethodPath(const std::string& method) const { 111 std::string BaseScreenHandler::FullMethodPath(const std::string& method) const {
111 DCHECK(!method.empty()); 112 DCHECK(!method.empty());
112 return js_screen_path_prefix_ + method; 113 return js_screen_path_prefix_ + method;
113 } 114 }
114 115
115 } // namespace chromeos 116 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698