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

Side by Side Diff: chrome/browser/chromeos/status/network_dropdown_button.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_STATUS_NETWORK_DROPDOWN_BUTTON_H_
6 #define CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_DROPDOWN_BUTTON_H_
7 #pragma once
8
9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/chromeos/cros/network_library.h"
11 #include "chrome/browser/chromeos/login/login_html_dialog.h"
12 #include "chrome/browser/chromeos/status/network_menu.h"
13 #include "chrome/browser/chromeos/status/network_menu_icon.h"
14 #include "chrome/browser/chromeos/views/dropdown_button.h"
15
16 namespace chromeos {
17
18 // The network dropdown button with menu. Used on welcome screen.
19 // This class will handle getting the networks to show connected network
20 // at top level and populating the menu.
21 // See NetworkMenu for more details.
22 class NetworkDropdownButton : public DropDownButton,
23 public views::ViewMenuDelegate,
24 public NetworkMenu::Delegate,
25 public NetworkMenuIcon::Delegate,
26 public NetworkLibrary::NetworkManagerObserver,
27 public LoginHtmlDialog::Delegate {
28 public:
29 NetworkDropdownButton(bool is_browser_mode,
30 gfx::NativeWindow parent_window,
31 bool should_show_options);
32 virtual ~NetworkDropdownButton();
33
34 void SetFirstLevelMenuWidth(int width);
35
36 void CancelMenu();
37
38 // Refreshes button state. Used when language has been changed.
39 void Refresh();
40
41 // NetworkLibrary::NetworkManagerObserver implementation.
42 virtual void OnNetworkManagerChanged(NetworkLibrary* obj) OVERRIDE;
43
44 // NetworkMenu::Delegate implementation:
45 virtual views::MenuButton* GetMenuButton() OVERRIDE;
46 virtual gfx::NativeWindow GetNativeWindow() const OVERRIDE;
47 virtual void OpenButtonOptions() OVERRIDE;
48 virtual bool ShouldOpenButtonOptions() const OVERRIDE;
49
50 // NetworkMenuIcon::Delegate implementation:
51 virtual void NetworkMenuIconChanged() OVERRIDE;
52
53 // views::ViewMenuDelegate implementation.
54 virtual void RunMenu(views::View* source, const gfx::Point& pt) OVERRIDE;
55
56 protected:
57 // Overridden from views::View.
58 virtual void OnLocaleChanged() OVERRIDE;
59
60 // LoginHtmlDialog::Delegate implementation:
61 virtual void OnDialogClosed() OVERRIDE;
62
63 private:
64 void SetNetworkIconAndText();
65
66 // The Network menu.
67 scoped_ptr<NetworkMenu> network_menu_;
68
69 // The Network menu icon.
70 scoped_ptr<NetworkMenuIcon> network_icon_;
71
72 gfx::NativeWindow parent_window_;
73
74 // If true things like proxy settings menu item will be supported.
75 bool should_show_options_;
76
77 // Proxy settings dialog that can be invoked from network menu.
78 scoped_ptr<LoginHtmlDialog> proxy_settings_dialog_;
79
80 DISALLOW_COPY_AND_ASSIGN(NetworkDropdownButton);
81 };
82
83 } // namespace chromeos
84
85 #endif // CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_DROPDOWN_BUTTON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698