OLD | NEW |
---|---|
1 // Copyright (c) 2010 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_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 "chrome/browser/chromeos/cros/network_library.h" | 9 #include "chrome/browser/chromeos/cros/network_library.h" |
10 #include "chrome/browser/chromeos/status/network_menu.h" | 10 #include "chrome/browser/chromeos/status/network_menu.h" |
11 #include "chrome/browser/chromeos/views/dropdown_button.h" | 11 #include "chrome/browser/chromeos/views/dropdown_button.h" |
(...skipping 17 matching lines...) Expand all Loading... | |
29 virtual void AnimationProgressed(const ui::Animation* animation); | 29 virtual void AnimationProgressed(const ui::Animation* animation); |
30 | 30 |
31 // NetworkLibrary::NetworkManagerObserver implementation. | 31 // NetworkLibrary::NetworkManagerObserver implementation. |
32 virtual void OnNetworkManagerChanged(NetworkLibrary* obj); | 32 virtual void OnNetworkManagerChanged(NetworkLibrary* obj); |
33 | 33 |
34 // Refreshes button state. Used when language has been changed. | 34 // Refreshes button state. Used when language has been changed. |
35 void Refresh(); | 35 void Refresh(); |
36 | 36 |
37 protected: | 37 protected: |
38 // NetworkMenu implementation: | 38 // NetworkMenu implementation: |
39 virtual bool IsBrowserMode() const { return browser_mode_; } | 39 virtual bool IsBrowserMode() const OVERRIDE { return browser_mode_; } |
40 virtual gfx::NativeWindow GetNativeWindow() const { return parent_window_; } | 40 virtual views::MenuButton* GetMenuButton() OVERRIDE { return this; } |
41 virtual void OpenButtonOptions() {} | 41 virtual gfx::NativeWindow GetNativeWindow() OVERRIDE const { |
42 virtual bool ShouldOpenButtonOptions() const { return false; } | 42 return parent_window_; |
43 } | |
oshima
2011/04/15 22:26:51
actually, can you move implementations to .cc? We'
rhashimoto
2011/04/15 23:44:32
Done.
| |
44 | |
45 virtual void OpenButtonOptions() OVERRIDE {} | |
46 virtual bool ShouldOpenButtonOptions() OVERRIDE const { return false; } | |
43 | 47 |
44 private: | 48 private: |
45 bool browser_mode_; | 49 bool browser_mode_; |
46 | 50 |
47 // The throb animation that does the wifi connecting animation. | 51 // The throb animation that does the wifi connecting animation. |
48 ui::ThrobAnimation animation_connecting_; | 52 ui::ThrobAnimation animation_connecting_; |
49 | 53 |
50 // The duration of the icon throbbing in milliseconds. | 54 // The duration of the icon throbbing in milliseconds. |
51 static const int kThrobDuration; | 55 static const int kThrobDuration; |
52 | 56 |
53 gfx::NativeWindow parent_window_; | 57 gfx::NativeWindow parent_window_; |
54 | 58 |
55 DISALLOW_COPY_AND_ASSIGN(NetworkDropdownButton); | 59 DISALLOW_COPY_AND_ASSIGN(NetworkDropdownButton); |
56 }; | 60 }; |
57 | 61 |
58 } // namespace chromeos | 62 } // namespace chromeos |
59 | 63 |
60 #endif // CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_DROPDOWN_BUTTON_H_ | 64 #endif // CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_DROPDOWN_BUTTON_H_ |
OLD | NEW |