OLD | NEW |
(Empty) | |
| 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 |
| 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 "chrome/browser/chromeos/cros/network_library.h" |
| 10 #include "chrome/browser/chromeos/status/network_menu.h" |
| 11 #include "views/controls/button/menu_button.h" |
| 12 |
| 13 namespace chromeos { |
| 14 |
| 15 // The network dropdown button with menu. Used on welcome screen. |
| 16 // This class will handle getting the networks to show connected network |
| 17 // at top level and populating the menu. |
| 18 // See NetworkMenu for more details. |
| 19 class NetworkDropdownButton : public views::MenuButton, |
| 20 public NetworkMenu, |
| 21 public NetworkLibrary::Observer { |
| 22 public: |
| 23 NetworkDropdownButton(bool browser_mode, gfx::NativeWindow parent_window); |
| 24 virtual ~NetworkDropdownButton(); |
| 25 |
| 26 // NetworkLibrary::Observer implementation. |
| 27 virtual void NetworkChanged(NetworkLibrary* obj); |
| 28 |
| 29 protected: |
| 30 // NetworkMenu implementation: |
| 31 virtual bool IsBrowserMode() const { return browser_mode_; } |
| 32 virtual gfx::NativeWindow GetNativeWindow() const { return parent_window_; } |
| 33 virtual void OpenButtonOptions() const {} |
| 34 virtual bool ShouldOpenButtonOptions() const {return false; } |
| 35 |
| 36 private: |
| 37 bool browser_mode_; |
| 38 |
| 39 gfx::NativeWindow parent_window_; |
| 40 |
| 41 DISALLOW_COPY_AND_ASSIGN(NetworkDropdownButton); |
| 42 }; |
| 43 |
| 44 } // namespace chromeos |
| 45 |
| 46 #endif // CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_DROPDOWN_BUTTON_H_ |
OLD | NEW |