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

Side by Side Diff: chrome/browser/chromeos/login/views_network_screen_actor.h

Issue 8436002: [cros] Remove Views implementation for login/OOBE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 9 years, 1 month 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_VIEWS_NETWORK_SCREEN_ACTOR_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_VIEWS_NETWORK_SCREEN_ACTOR_H_
7 #pragma once
8
9 #include "base/memory/ref_counted.h"
10 #include "base/string16.h"
11 #include "base/task.h"
12 #include "base/timer.h"
13 #include "chrome/browser/chromeos/cros/network_library.h"
14 #include "chrome/browser/chromeos/login/keyboard_switch_menu.h"
15 #include "chrome/browser/chromeos/login/language_switch_menu.h"
16 #include "chrome/browser/chromeos/login/message_bubble.h"
17 #include "chrome/browser/chromeos/login/network_screen_actor.h"
18 #include "chrome/browser/chromeos/login/network_selection_view.h"
19 #include "chrome/browser/chromeos/login/view_screen.h"
20 #include "chrome/browser/chromeos/options/network_config_view.h"
21 #include "views/controls/button/button.h"
22
23 namespace chromeos {
24
25 class HelpAppLauncher;
26 class ViewScreenDelegate;
27
28 // Views-specific implementation of NetworkScreenActor. Hosts
29 // NetworkSelectionView.
30 class ViewsNetworkScreenActor : public ViewScreen<NetworkSelectionView>,
31 public MessageBubbleDelegate,
32 public NetworkScreenActor,
33 public views::ButtonListener {
34 public:
35 explicit ViewsNetworkScreenActor(ViewScreenDelegate* delegate);
36 virtual ~ViewsNetworkScreenActor();
37
38 // NetworkScreenActor implementation:
39 virtual void SetDelegate(Delegate* screen) OVERRIDE;
40 virtual void PrepareToShow() OVERRIDE;
41 virtual void Show() OVERRIDE;
42 virtual void Hide() OVERRIDE;
43 virtual gfx::Size GetScreenSize() const OVERRIDE;
44 virtual void ShowError(const string16& message) OVERRIDE;
45 virtual void ClearErrors() OVERRIDE;
46 virtual void ShowConnectingStatus(
47 bool connecting,
48 const string16& network_id) OVERRIDE;
49 virtual void EnableContinue(bool enabled) OVERRIDE;
50
51 // views::ButtonListener implementation:
52 virtual void ButtonPressed(views::Button* sender,
53 const views::Event& event) OVERRIDE;
54
55 // Returns true if a bubble with error is shown currently to the user.
56 bool IsErrorShown() const;
57
58 // TODO(avayvod): Get rid of the dependency on the menus by moving it
59 // either to the view or here.
60 LanguageSwitchMenu* language_switch_menu() {
61 return &language_switch_menu_;
62 }
63
64 KeyboardSwitchMenu* keyboard_switch_menu() {
65 return &keyboard_switch_menu_;
66 }
67
68 // For tests.
69 virtual bool IsContinueEnabled() const;
70 virtual bool IsConnecting() const;
71
72 private:
73 // Overridden views::BubbleDelegate.
74 virtual void BubbleClosing(Bubble* bubble, bool closed_by_escape) OVERRIDE;
75 virtual bool CloseOnEscape() OVERRIDE;
76 virtual bool FadeInOnShow() OVERRIDE;
77 virtual void OnLinkActivated(size_t index) OVERRIDE;
78
79 // ViewScreen implementation:
80 virtual void CreateView() OVERRIDE;
81 virtual NetworkSelectionView* AllocateView() OVERRIDE;
82
83 LanguageSwitchMenu language_switch_menu_;
84 KeyboardSwitchMenu keyboard_switch_menu_;
85
86 // Pointer to shown message bubble. We don't need to delete it because
87 // it will be deleted on bubble closing.
88 MessageBubble* bubble_;
89
90 // Help application used for help dialogs.
91 scoped_refptr<HelpAppLauncher> help_app_;
92
93 // Listener for continue button to be pressed.
94 Delegate* screen_;
95
96 DISALLOW_COPY_AND_ASSIGN(ViewsNetworkScreenActor);
97 };
98
99 } // namespace chromeos
100
101 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_VIEWS_NETWORK_SCREEN_ACTOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/views_login_display_host.cc ('k') | chrome/browser/chromeos/login/views_network_screen_actor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698