Index: chrome/browser/chromeos/status/network_dropdown_button.h |
diff --git a/chrome/browser/chromeos/status/network_dropdown_button.h b/chrome/browser/chromeos/status/network_dropdown_button.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4be58d4fba566c24fb87d13871e313ab02dd05f4 |
--- /dev/null |
+++ b/chrome/browser/chromeos/status/network_dropdown_button.h |
@@ -0,0 +1,46 @@ |
+// Copyright (c) 2010 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_DROPDOWN_BUTTON_H_ |
+#define CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_DROPDOWN_BUTTON_H_ |
+#pragma once |
+ |
+#include "chrome/browser/chromeos/cros/network_library.h" |
+#include "chrome/browser/chromeos/status/network_menu.h" |
+#include "views/controls/button/menu_button.h" |
+ |
+namespace chromeos { |
+ |
+// The network dropdown button with menu. Used on welcome screen. |
+// This class will handle getting the networks to show connected network |
+// at top level and populating the menu. |
+// See NetworkMenu for more details. |
+class NetworkDropdownButton : public views::MenuButton, |
+ public NetworkMenu, |
+ public NetworkLibrary::Observer { |
+ public: |
+ NetworkDropdownButton(bool browser_mode, gfx::NativeWindow parent_window); |
+ virtual ~NetworkDropdownButton(); |
+ |
+ // NetworkLibrary::Observer implementation. |
+ virtual void NetworkChanged(NetworkLibrary* obj); |
+ |
+ protected: |
+ // NetworkMenu implementation: |
+ virtual bool IsBrowserMode() const { return browser_mode_; } |
+ virtual gfx::NativeWindow GetNativeWindow() const { return parent_window_; } |
+ virtual void OpenButtonOptions() const {} |
+ virtual bool ShouldOpenButtonOptions() const {return false; } |
+ |
+ private: |
+ bool browser_mode_; |
+ |
+ gfx::NativeWindow parent_window_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(NetworkDropdownButton); |
+}; |
+ |
+} // namespace chromeos |
+ |
+#endif // CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_DROPDOWN_BUTTON_H_ |