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

Side by Side Diff: chrome/browser/chromeos/status/network_dropdown_button.h

Issue 4235005: Push for ers:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_STATUS_NETWORK_DROPDOWN_BUTTON_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_DROPDOWN_BUTTON_H_
6 #define CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_DROPDOWN_BUTTON_H_ 6 #define CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_DROPDOWN_BUTTON_H_
7 #pragma once 7 #pragma once
8 8
9 #include "app/throb_animation.h" 9 #include "app/throb_animation.h"
10 #include "chrome/browser/chromeos/cros/network_library.h" 10 #include "chrome/browser/chromeos/cros/network_library.h"
11 #include "chrome/browser/chromeos/status/network_menu.h" 11 #include "chrome/browser/chromeos/status/network_menu.h"
12 #include "views/controls/button/menu_button.h" 12 #include "views/controls/button/menu_button.h"
13 13
14 namespace chromeos { 14 namespace chromeos {
15 15
16 // The network dropdown button with menu. Used on welcome screen. 16 // The network dropdown button with menu. Used on welcome screen.
17 // This class will handle getting the networks to show connected network 17 // This class will handle getting the networks to show connected network
18 // at top level and populating the menu. 18 // at top level and populating the menu.
19 // See NetworkMenu for more details. 19 // See NetworkMenu for more details.
20 class NetworkDropdownButton : public views::MenuButton, 20 class NetworkDropdownButton : public views::MenuButton,
21 public NetworkMenu, 21 public NetworkMenu,
22 public NetworkLibrary::Observer { 22 public NetworkLibrary::NetworkManagerObserver {
23 public: 23 public:
24 NetworkDropdownButton(bool browser_mode, gfx::NativeWindow parent_window); 24 NetworkDropdownButton(bool browser_mode, gfx::NativeWindow parent_window);
25 virtual ~NetworkDropdownButton(); 25 virtual ~NetworkDropdownButton();
26 26
27 // AnimationDelegate implementation. 27 // AnimationDelegate implementation.
28 virtual void AnimationProgressed(const Animation* animation); 28 virtual void AnimationProgressed(const Animation* animation);
29 29
30 // NetworkLibrary::Observer implementation. 30 // NetworkLibrary::NetworkManagerObserver implementation.
31 virtual void NetworkChanged(NetworkLibrary* obj); 31 virtual void OnNetworkManagerChanged(NetworkLibrary* obj);
32 32
33 // Refreshes button state. Used when language has been changed. 33 // Refreshes button state. Used when language has been changed.
34 void Refresh(); 34 void Refresh();
35 35
36 protected: 36 protected:
37 // NetworkMenu implementation: 37 // NetworkMenu implementation:
38 virtual bool IsBrowserMode() const { return browser_mode_; } 38 virtual bool IsBrowserMode() const { return browser_mode_; }
39 virtual gfx::NativeWindow GetNativeWindow() const { return parent_window_; } 39 virtual gfx::NativeWindow GetNativeWindow() const { return parent_window_; }
40 virtual void OpenButtonOptions() const {} 40 virtual void OpenButtonOptions() const {}
41 virtual bool ShouldOpenButtonOptions() const {return false; } 41 virtual bool ShouldOpenButtonOptions() const {return false; }
42 42
43 private: 43 private:
44 bool browser_mode_; 44 bool browser_mode_;
45 45
46 // The throb animation that does the wifi connecting animation. 46 // The throb animation that does the wifi connecting animation.
47 ThrobAnimation animation_connecting_; 47 ThrobAnimation animation_connecting_;
48 48
49 // The duration of the icon throbbing in milliseconds. 49 // The duration of the icon throbbing in milliseconds.
50 static const int kThrobDuration; 50 static const int kThrobDuration;
51 51
52 gfx::NativeWindow parent_window_; 52 gfx::NativeWindow parent_window_;
53 53
54 DISALLOW_COPY_AND_ASSIGN(NetworkDropdownButton); 54 DISALLOW_COPY_AND_ASSIGN(NetworkDropdownButton);
55 }; 55 };
56 56
57 } // namespace chromeos 57 } // namespace chromeos
58 58
59 #endif // CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_DROPDOWN_BUTTON_H_ 59 #endif // CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_DROPDOWN_BUTTON_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/options/internet_page_view.cc ('k') | chrome/browser/chromeos/status/network_dropdown_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698