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

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

Issue 8682011: views: Move combobox directory to ui/views/controls/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/focus/focus_traversal_unittest.cc ('k') | views/controls/combobox/combobox.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/combobox/combobox.h
diff --git a/views/controls/combobox/combobox.h b/views/controls/combobox/combobox.h
deleted file mode 100644
index 85791226b1b03f0f710ab89d9e2a83f62468f6a1..0000000000000000000000000000000000000000
--- a/views/controls/combobox/combobox.h
+++ /dev/null
@@ -1,102 +0,0 @@
-// Copyright (c) 2011 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_COMBOBOX_H_
-#define VIEWS_CONTROLS_COMBOBOX_COMBOBOX_H_
-#pragma once
-
-#include <string>
-
-#include "ui/gfx/native_widget_types.h"
-#include "views/controls/combobox/native_combobox_wrapper.h"
-#include "views/view.h"
-
-namespace ui {
-class ComboboxModel;
-}
-
-namespace views {
-
-class ComboboxListener;
-
-// A non-editable combo-box (aka a drop-down list)
-class VIEWS_EXPORT Combobox : public View {
- public:
- // The combobox's class name.
- static const char kViewClassName[];
-
- // |model| is not owned by the combo box.
- explicit Combobox(ui::ComboboxModel* model);
- virtual ~Combobox();
-
- // Register |listener| for item change events.
- void set_listener(ComboboxListener* listener) {
- listener_ = listener;
- }
-
- // Inform the combo box that its model changed.
- void ModelChanged();
-
- // Gets/Sets the selected item.
- int selected_item() const { return selected_item_; }
- void SetSelectedItem(int index);
-
- // Called when the combo box's selection is changed by the user.
- void SelectionChanged();
-
- // Accessor for |model_|.
- ui::ComboboxModel* model() const { return model_; }
-
- // Set the accessible name of the combo box.
- void SetAccessibleName(const string16& name);
-
- // Provided only for testing:
- gfx::NativeView GetTestingHandle() const {
- return native_wrapper_ ? native_wrapper_->GetTestingHandle() : NULL;
- }
- NativeComboboxWrapper* GetNativeWrapperForTesting() const {
- return native_wrapper_;
- }
-
- // Overridden from View:
- virtual gfx::Size GetPreferredSize() OVERRIDE;
- virtual void Layout() OVERRIDE;
- virtual void OnEnabledChanged() OVERRIDE;
- virtual bool SkipDefaultKeyEventProcessing(const KeyEvent& e) OVERRIDE;
- virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE;
- virtual bool OnKeyPressed(const views::KeyEvent& e) OVERRIDE;
- virtual bool OnKeyReleased(const views::KeyEvent& e) OVERRIDE;
- virtual void OnFocus() OVERRIDE;
- virtual void OnBlur() OVERRIDE;
- virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
-
- protected:
- // Overridden from View:
- virtual void ViewHierarchyChanged(bool is_add,
- View* parent,
- View* child) OVERRIDE;
- virtual std::string GetClassName() const OVERRIDE;
-
- // The object that actually implements the native combobox.
- NativeComboboxWrapper* native_wrapper_;
-
- private:
- // Our model.
- ui::ComboboxModel* model_;
-
- // The combobox's listener. Notified when the selected item change.
- ComboboxListener* listener_;
-
- // The current selection.
- int selected_item_;
-
- // The accessible name of the text field.
- string16 accessible_name_;
-
- DISALLOW_COPY_AND_ASSIGN(Combobox);
-};
-
-} // namespace views
-
-#endif // VIEWS_CONTROLS_COMBOBOX_COMBOBOX_H_
« no previous file with comments | « ui/views/focus/focus_traversal_unittest.cc ('k') | views/controls/combobox/combobox.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698