Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / chromeos / login / screens / network_screen_actor.h
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_NETWORK_SCREEN_ACTOR_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_NETWORK_SCREEN_ACTOR_H_
7
8 #include "base/strings/string16.h"
9
10 namespace chromeos {
11
12 // Interface for dependency injection between NetworkScreen and its actual
13 // representation, either views based or WebUI. Owned by NetworkScreen.
14 class NetworkScreenActor {
15  public:
16   class Delegate {
17    public:
18     virtual ~Delegate() {}
19     virtual void OnActorDestroyed(NetworkScreenActor* actor) = 0;
20     virtual void OnContinuePressed() = 0;
21   };
22
23   virtual ~NetworkScreenActor() {}
24
25   // Sets screen this actor belongs to.
26   virtual void SetDelegate(Delegate* screen) = 0;
27
28   // Prepare the contents to showing.
29   virtual void PrepareToShow() = 0;
30
31   // Shows the contents of the screen.
32   virtual void Show() = 0;
33
34   // Hides the contents of the screen.
35   virtual void Hide() = 0;
36
37   // Shows error message in a bubble.
38   virtual void ShowError(const base::string16& message) = 0;
39
40   // Hides error messages showing no error state.
41   virtual void ClearErrors() = 0;
42
43   // Shows network connecting status or network selection otherwise.
44   virtual void ShowConnectingStatus(
45       bool connecting,
46       const base::string16& network_id) = 0;
47
48   // Sets whether continue control is enabled.
49   virtual void EnableContinue(bool enabled) = 0;
50
51   // Getters for locale, keyboard layout, timezone.
52   virtual std::string GetApplicationLocale() const = 0;
53   virtual std::string GetInputMethod() const = 0;
54   virtual std::string GetTimezone() const = 0;
55
56   // Setters for locale, keyboard layout and timezone.
57   virtual void SetApplicationLocale(const std::string& locale) = 0;
58   virtual void SetInputMethod(const std::string& input_method) = 0;
59   virtual void SetTimezone(const std::string& timezone) = 0;
60 };
61
62 }  // namespace chromeos
63
64 #endif  // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_NETWORK_SCREEN_ACTOR_H_