| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_CHROMEOS_LOGIN_LOGIN_DISPLAY_HOST_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_DISPLAY_HOST_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_DISPLAY_HOST_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_DISPLAY_HOST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "chrome/browser/chromeos/login/background_view.h" | 11 #include "chrome/browser/chromeos/login/background_view.h" |
| 12 #include "chrome/browser/chromeos/customization_document.h" | 12 #include "chrome/browser/chromeos/customization_document.h" |
| 13 #include "chrome/browser/chromeos/login/login_display.h" | 13 #include "chrome/browser/chromeos/login/login_display.h" |
| 14 #include "googleurl/src/gurl.h" | 14 #include "googleurl/src/gurl.h" |
| 15 #include "ui/gfx/native_widget_types.h" | 15 #include "ui/gfx/native_widget_types.h" |
| 16 | 16 |
| 17 namespace chromeos { | 17 namespace chromeos { |
| 18 | 18 |
| 19 // An interface that defines OOBE/login screen host. | 19 // An interface that defines OOBE/login screen host. |
| 20 // Host encapsulates implementation specific background window (views/WebUI), | 20 // Host encapsulates implementation specific background window (views/WebUI), |
| 21 // OOBE/login controllers, views/WebUI UI implementation (such as LoginDisplay). | 21 // OOBE/login controllers, views/WebUI UI implementation (such as LoginDisplay). |
| 22 class LoginDisplayHost { | 22 class LoginDisplayHost { |
| 23 public: | 23 public: |
| 24 virtual ~LoginDisplayHost() {} | 24 virtual ~LoginDisplayHost() {} |
| 25 | 25 |
| 26 // Creates UI implementation specific login display instance (views/WebUI). | 26 // Creates UI implementation specific login display instance (views/WebUI). |
| 27 // The caller takes ownership of the returned value. |
| 27 virtual LoginDisplay* CreateLoginDisplay( | 28 virtual LoginDisplay* CreateLoginDisplay( |
| 28 LoginDisplay::Delegate* delegate) const = 0; | 29 LoginDisplay::Delegate* delegate) = 0; |
| 29 | 30 |
| 30 // Returns corresponding native window. | 31 // Returns corresponding native window. |
| 31 // TODO(nkostylev): Might be refactored, move to views-specific code. | 32 // TODO(nkostylev): Might be refactored, move to views-specific code. |
| 32 virtual gfx::NativeWindow GetNativeWindow() const = 0; | 33 virtual gfx::NativeWindow GetNativeWindow() const = 0; |
| 33 | 34 |
| 34 // Called when browsing session starts so | 35 // Called when browsing session starts so |
| 35 // LoginDisplayHost instance may delete itself. | 36 // LoginDisplayHost instance may delete itself. |
| 36 virtual void OnSessionStart() = 0; | 37 virtual void OnSessionStart() = 0; |
| 37 | 38 |
| 38 // TODO(nkostylev): Refactor enum. | 39 // TODO(nkostylev): Refactor enum. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 61 const std::string& first_screen_name, | 62 const std::string& first_screen_name, |
| 62 const GURL& start_url) = 0; | 63 const GURL& start_url) = 0; |
| 63 | 64 |
| 64 // Starts sign in screen. | 65 // Starts sign in screen. |
| 65 virtual void StartSignInScreen() = 0; | 66 virtual void StartSignInScreen() = 0; |
| 66 }; | 67 }; |
| 67 | 68 |
| 68 } // namespace chromeos | 69 } // namespace chromeos |
| 69 | 70 |
| 70 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_DISPLAY_HOST_H_ | 71 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_DISPLAY_HOST_H_ |
| OLD | NEW |