summaryrefslogtreecommitdiffstats
path: root/views/controls
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-26 21:54:53 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-26 21:54:53 +0000
commit70554e84d082f51ec6c04891c21942923370694c (patch)
treed643866fce27a612443e80e014e153388037ca93 /views/controls
parente88648a5287fe504f34b83b44b73fc081616c9b1 (diff)
downloadchromium_src-70554e84d082f51ec6c04891c21942923370694c.zip
chromium_src-70554e84d082f51ec6c04891c21942923370694c.tar.gz
chromium_src-70554e84d082f51ec6c04891c21942923370694c.tar.bz2
Stubs out FocusManager and Menu so they compile on Linux.
BUG=none TEST=none Review URL: http://codereview.chromium.org/115794 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16928 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls')
-rw-r--r--views/controls/menu/menu_gtk.cc82
-rw-r--r--views/controls/menu/menu_gtk.h52
2 files changed, 134 insertions, 0 deletions
diff --git a/views/controls/menu/menu_gtk.cc b/views/controls/menu/menu_gtk.cc
new file mode 100644
index 0000000..c2abb44
--- /dev/null
+++ b/views/controls/menu/menu_gtk.cc
@@ -0,0 +1,82 @@
+// Copyright (c) 2008 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.
+
+#include "views/controls/menu/menu_gtk.h"
+
+#include "base/logging.h"
+
+namespace views {
+
+// static
+Menu* Menu::Create(Delegate* delegate,
+ AnchorPoint anchor,
+ gfx::NativeView parent) {
+ return new MenuGtk(delegate, anchor, parent);
+}
+
+// static
+Menu* Menu::GetSystemMenu(gfx::NativeWindow parent) {
+ NOTIMPLEMENTED();
+ return NULL;
+}
+
+MenuGtk::MenuGtk(Delegate* d, AnchorPoint anchor, gfx::NativeView owner)
+ : Menu(d, anchor) {
+ DCHECK(delegate());
+}
+
+MenuGtk::~MenuGtk() {
+}
+
+Menu* MenuGtk::AddSubMenuWithIcon(int index,
+ int item_id,
+ const std::wstring& label,
+ const SkBitmap& icon) {
+ NOTIMPLEMENTED();
+ return NULL;
+}
+
+void MenuGtk::AddSeparator(int index) {
+ NOTIMPLEMENTED();
+}
+
+void MenuGtk::EnableMenuItemByID(int item_id, bool enabled) {
+ NOTIMPLEMENTED();
+}
+
+void MenuGtk::EnableMenuItemAt(int index, bool enabled) {
+ NOTIMPLEMENTED();
+}
+
+void MenuGtk::SetMenuLabel(int item_id, const std::wstring& label) {
+ NOTIMPLEMENTED();
+}
+
+bool MenuGtk::SetIcon(const SkBitmap& icon, int item_id) {
+ NOTIMPLEMENTED();
+ return false;
+}
+
+void MenuGtk::RunMenuAt(int x, int y) {
+ NOTIMPLEMENTED();
+}
+
+void MenuGtk::Cancel() {
+ NOTIMPLEMENTED();
+}
+
+int MenuGtk::ItemCount() {
+ NOTIMPLEMENTED();
+ return 0;
+}
+
+void MenuGtk::AddMenuItemInternal(int index,
+ int item_id,
+ const std::wstring& label,
+ const SkBitmap& icon,
+ MenuItemType type) {
+ NOTIMPLEMENTED();
+}
+
+} // namespace views
diff --git a/views/controls/menu/menu_gtk.h b/views/controls/menu/menu_gtk.h
new file mode 100644
index 0000000..5e7ad16
--- /dev/null
+++ b/views/controls/menu/menu_gtk.h
@@ -0,0 +1,52 @@
+// 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_MENU_VIEWS_MENU_GTK_H_
+#define VIEWS_CONTROLS_MENU_VIEWS_MENU_GTK_H_
+
+#include "base/basictypes.h"
+#include "views/controls/menu/menu.h"
+
+namespace views {
+
+class MenuGtk : public Menu {
+ public:
+ // Construct a Menu using the specified controller to determine command
+ // state.
+ // delegate A Menu::Delegate implementation that provides more
+ // information about the Menu presentation.
+ // anchor An alignment hint for the popup menu.
+ // owner The window that the menu is being brought up relative
+ // to. Not actually used for anything but must not be
+ // NULL.
+ MenuGtk(Delegate* d, AnchorPoint anchor, gfx::NativeView owner);
+ virtual ~MenuGtk();
+
+ // Menu overrides.
+ virtual Menu* AddSubMenuWithIcon(int index,
+ int item_id,
+ const std::wstring& label,
+ const SkBitmap& icon);
+ virtual void AddSeparator(int index);
+ virtual void EnableMenuItemByID(int item_id, bool enabled);
+ virtual void EnableMenuItemAt(int index, bool enabled);
+ virtual void SetMenuLabel(int item_id, const std::wstring& label);
+ virtual bool SetIcon(const SkBitmap& icon, int item_id);
+ virtual void RunMenuAt(int x, int y);
+ virtual void Cancel();
+ virtual int ItemCount();
+
+ protected:
+ virtual void AddMenuItemInternal(int index,
+ int item_id,
+ const std::wstring& label,
+ const SkBitmap& icon,
+ MenuItemType type);
+
+ DISALLOW_COPY_AND_ASSIGN(MenuGtk);
+};
+
+} // namespace views
+
+#endif // VIEWS_CONTROLS_MENU_VIEWS_MENU_GTK_H_