| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_BASE_SCREEN_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_BASE_SCREEN_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_BASE_SCREEN_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_BASE_SCREEN_HANDLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 OobeScreen GetCurrentScreen() const; | 213 OobeScreen GetCurrentScreen() const; |
| 214 | 214 |
| 215 // Whether page is ready. | 215 // Whether page is ready. |
| 216 bool page_is_ready() const { return page_is_ready_; } | 216 bool page_is_ready() const { return page_is_ready_; } |
| 217 | 217 |
| 218 // Returns the window which shows us. | 218 // Returns the window which shows us. |
| 219 virtual gfx::NativeWindow GetNativeWindow(); | 219 virtual gfx::NativeWindow GetNativeWindow(); |
| 220 | 220 |
| 221 void SetBaseScreen(BaseScreen* base_screen); | 221 void SetBaseScreen(BaseScreen* base_screen); |
| 222 | 222 |
| 223 // Returns true if JS side has sent a screenStateInitialize event. |
| 224 // TODO(jdufault): Remove after resolving crbug.com/699798 |
| 225 bool is_js_initialized_and_ready() const { |
| 226 return js_calls_container_->is_initialized(); |
| 227 } |
| 228 |
| 223 private: | 229 private: |
| 224 // Calls Javascript method. | 230 // Calls Javascript method. |
| 225 // | 231 // |
| 226 // Note that the Args template parameter pack should consist of types | 232 // Note that the Args template parameter pack should consist of types |
| 227 // convertible to base::Value. | 233 // convertible to base::Value. |
| 228 template <typename... Args> | 234 template <typename... Args> |
| 229 void ExecuteDeferredJSCall(const std::string& function_name, | 235 void ExecuteDeferredJSCall(const std::string& function_name, |
| 230 std::unique_ptr<Args>... args) { | 236 std::unique_ptr<Args>... args) { |
| 231 CallJS(function_name, *args...); | 237 CallJS(function_name, *args...); |
| 232 } | 238 } |
| (...skipping 27 matching lines...) Expand all Loading... |
| 260 base::DictionaryValue pending_context_changes_; | 266 base::DictionaryValue pending_context_changes_; |
| 261 | 267 |
| 262 JSCallsContainer* js_calls_container_ = nullptr; // non-owning pointers. | 268 JSCallsContainer* js_calls_container_ = nullptr; // non-owning pointers. |
| 263 | 269 |
| 264 DISALLOW_COPY_AND_ASSIGN(BaseScreenHandler); | 270 DISALLOW_COPY_AND_ASSIGN(BaseScreenHandler); |
| 265 }; | 271 }; |
| 266 | 272 |
| 267 } // namespace chromeos | 273 } // namespace chromeos |
| 268 | 274 |
| 269 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_BASE_SCREEN_HANDLER_H_ | 275 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_BASE_SCREEN_HANDLER_H_ |
| OLD | NEW |