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

Unified Diff: views/controls/combobox/native_combobox_wrapper.h

Issue 113991: Make Combobox portable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/controls/combobox/native_combobox_win.cc ('k') | views/controls/native/native_view_host_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/combobox/native_combobox_wrapper.h
===================================================================
--- views/controls/combobox/native_combobox_wrapper.h (revision 0)
+++ views/controls/combobox/native_combobox_wrapper.h (revision 0)
@@ -0,0 +1,48 @@
+// Copyright (c) 2009 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 VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_WRAPPER_H_
+#define VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_WRAPPER_H_
+
+namespace gfx{
+class Size;
+}
+
+namespace views {
+
+class Combobox;
+class View;
+
+class NativeComboboxWrapper {
+ public:
+ // Updates the combobox's content from its model.
+ virtual void UpdateFromModel() = 0;
+
+ // Updates the displayed selected item from the associated Combobox.
+ virtual void UpdateSelectedItem() = 0;
+
+ // Updates the enabled state of the combobox from the associated view.
+ virtual void UpdateEnabled() = 0;
+
+ // Gets the selected index.
+ virtual int GetSelectedItem() const = 0;
+
+ // Returns true if the Combobox dropdown is open.
+ virtual bool IsDropdownOpen() const = 0;
+
+ // Returns the preferred size of the combobox.
+ virtual gfx::Size GetPreferredSize() const = 0;
+
+ // Retrieves the views::View that hosts the native control.
+ virtual View* GetView() = 0;
+
+ // Sets the focus to the button.
+ virtual void SetFocus() = 0;
+
+ static NativeComboboxWrapper* CreateWrapper(Combobox* combobox);
+};
+
+} // namespace views
+
+#endif // VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_WRAPPER_H_
« no previous file with comments | « views/controls/combobox/native_combobox_win.cc ('k') | views/controls/native/native_view_host_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698