summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-07 20:09:54 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-07 20:09:54 +0000
commit94fbaa41f59f3dcb859627b698338d133fec1eb1 (patch)
treef5ee660a40ee6fafc99eccd64a50645f57e44ea1 /views
parenta8ca1a99ddee3b8c1c60bddb27c0c6b4893ec92a (diff)
downloadchromium_src-94fbaa41f59f3dcb859627b698338d133fec1eb1.zip
chromium_src-94fbaa41f59f3dcb859627b698338d133fec1eb1.tar.gz
chromium_src-94fbaa41f59f3dcb859627b698338d133fec1eb1.tar.bz2
Get chrome to link with USE_AURA
http://crbug.com/93947 TEST=none R=sadrul TBR=jabdelmalek for the content/webkit stubs Review URL: http://codereview.chromium.org/7841012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99993 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/controls/menu/native_menu_aura.cc68
-rw-r--r--views/events/event.h2
-rw-r--r--views/events/event_aura.cc8
-rw-r--r--views/views.gyp4
4 files changed, 78 insertions, 4 deletions
diff --git a/views/controls/menu/native_menu_aura.cc b/views/controls/menu/native_menu_aura.cc
new file mode 100644
index 0000000..d441712
--- /dev/null
+++ b/views/controls/menu/native_menu_aura.cc
@@ -0,0 +1,68 @@
+// 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.
+
+#include "views/controls/menu/native_menu_linux.h"
+
+#include "base/logging.h"
+#include "views/controls/menu/menu_2.h"
+#include "views/controls/menu/menu_wrapper.h"
+
+namespace views {
+
+class NativeMenuAura : public MenuWrapper {
+public:
+ explicit NativeMenuAura(Menu2* menu) {}
+ virtual ~NativeMenuAura() {}
+
+ // Overridden from MenuWrapper:
+ virtual void RunMenuAt(const gfx::Point& point, int alignment) OVERRIDE {
+ NOTIMPLEMENTED();
+ }
+
+ virtual void CancelMenu() OVERRIDE {
+ NOTIMPLEMENTED();
+ }
+
+ virtual void Rebuild() OVERRIDE {
+ NOTIMPLEMENTED();
+ }
+
+ virtual void UpdateStates() OVERRIDE {
+ NOTIMPLEMENTED();
+ }
+
+ virtual gfx::NativeMenu GetNativeMenu() const OVERRIDE {
+ NOTIMPLEMENTED();
+ return NULL;
+ }
+
+ virtual MenuWrapper::MenuAction GetMenuAction() const OVERRIDE {
+ NOTIMPLEMENTED();
+ return MENU_ACTION_NONE;
+ }
+
+ virtual void AddMenuListener(MenuListener* listener) OVERRIDE {
+ NOTIMPLEMENTED();
+ }
+
+ virtual void RemoveMenuListener(MenuListener* listener) OVERRIDE {
+ NOTIMPLEMENTED();
+ }
+
+ virtual void SetMinimumWidth(int width) OVERRIDE {
+ NOTIMPLEMENTED();
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(NativeMenuAura);
+};
+
+// MenuWrapper, public:
+
+// static
+MenuWrapper* MenuWrapper::CreateWrapper(Menu2* menu) {
+ return new NativeMenuAura(menu);
+}
+
+} // namespace views
diff --git a/views/events/event.h b/views/events/event.h
index 3278bc4..99a0c9b 100644
--- a/views/events/event.h
+++ b/views/events/event.h
@@ -88,7 +88,7 @@ class VIEWS_EXPORT Event {
type_ == ui::ET_TOUCH_CANCELLED;
}
-#if defined(OS_WIN)
+#if defined(OS_WIN) && !defined(USE_AURA)
// Returns the EventFlags in terms of windows flags.
int GetWindowsFlags() const;
#elif defined(OS_LINUX)
diff --git a/views/events/event_aura.cc b/views/events/event_aura.cc
index 5423fe0..fcd9dac 100644
--- a/views/events/event_aura.cc
+++ b/views/events/event_aura.cc
@@ -26,6 +26,14 @@ int EventFlagsFromNative(NativeEvent native_event) {
}
+bool IsClientMouseEvent(const views::NativeEvent& native_event) {
+ return true;
+}
+
+bool IsNonClientMouseEvent(const views::NativeEvent& native_event) {
+ return false;
+}
+
////////////////////////////////////////////////////////////////////////////////
// Event, private:
diff --git a/views/views.gyp b/views/views.gyp
index e90ffbd..957c45f 100644
--- a/views/views.gyp
+++ b/views/views.gyp
@@ -134,6 +134,7 @@
'controls/menu/menu_win.cc',
'controls/menu/menu_win.h',
'controls/menu/menu_wrapper.h',
+ 'controls/menu/native_menu_aura.cc',
'controls/menu/native_menu_gtk.cc',
'controls/menu/native_menu_gtk.h',
'controls/menu/native_menu_host.h',
@@ -423,8 +424,6 @@
['exclude', '/(gtk|x)_[^/]*\\.cc$'],
],
'sources!': [
- 'controls/menu/menu_2.cc',
- 'controls/menu/menu_2.h',
'controls/native_control.cc',
'controls/native_control.h',
'controls/scrollbar/bitmap_scroll_bar.cc',
@@ -441,7 +440,6 @@
'controls/table/table_view_observer.h',
'controls/tree/tree_view.cc',
'controls/tree/tree_view.h',
- 'focus/accelerator_handler_aura.cc',
'focus/accelerator_handler_touch.cc',
'widget/aero_tooltip_manager.cc',
'widget/aero_tooltip_manager.h',