summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorsadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-07 02:24:21 +0000
committersadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-07 02:24:21 +0000
commit7f2d5d50525558e6637945ac9a6377ece01ae8f9 (patch)
tree286603d3b7933099a0fed18b23d8bdf09c32a4b7 /views
parent03e17d2717545c6df09d0d1dcd69e765412f4f5c (diff)
downloadchromium_src-7f2d5d50525558e6637945ac9a6377ece01ae8f9.zip
chromium_src-7f2d5d50525558e6637945ac9a6377ece01ae8f9.tar.gz
chromium_src-7f2d5d50525558e6637945ac9a6377ece01ae8f9.tar.bz2
aura-views: Make views_aura_desktop compile and run on linux.
BUG=none TEST=none Review URL: http://codereview.chromium.org/7739016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99901 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/aura_desktop/aura_desktop_main.cc4
-rw-r--r--views/controls/menu/menu_controller.cc6
-rw-r--r--views/controls/menu/menu_controller.h2
-rw-r--r--views/drag_utils_linux.cc18
-rw-r--r--views/views.gyp12
-rw-r--r--views/window/dialog_client_view.cc2
6 files changed, 42 insertions, 2 deletions
diff --git a/views/aura_desktop/aura_desktop_main.cc b/views/aura_desktop/aura_desktop_main.cc
index 93e22fa..ceed1ef 100644
--- a/views/aura_desktop/aura_desktop_main.cc
+++ b/views/aura_desktop/aura_desktop_main.cc
@@ -20,6 +20,10 @@
#include "views/widget/widget.h"
#include "views/widget/widget_delegate.h"
+#if !defined(OS_WIN)
+#include "aura/hit_test.h"
+#endif
+
namespace {
// Trivial WindowDelegate implementation that draws a colored background.
diff --git a/views/controls/menu/menu_controller.cc b/views/controls/menu/menu_controller.cc
index acad114..1255610 100644
--- a/views/controls/menu/menu_controller.cc
+++ b/views/controls/menu/menu_controller.cc
@@ -877,6 +877,12 @@ base::MessagePumpDispatcher::DispatchStatus
base::MessagePumpDispatcher::EVENT_QUIT :
base::MessagePumpDispatcher::EVENT_PROCESSED;
}
+#elif defined(USE_AURA)
+base::MessagePumpDispatcher::DispatchStatus
+ MenuController::Dispatch(XEvent* xev) {
+ NOTREACHED();
+ return EVENT_PROCESSED;
+}
#elif defined(TOUCH_UI)
base::MessagePumpDispatcher::DispatchStatus
MenuController::Dispatch(XEvent* xev) {
diff --git a/views/controls/menu/menu_controller.h b/views/controls/menu/menu_controller.h
index 91f4d79..0064f98 100644
--- a/views/controls/menu/menu_controller.h
+++ b/views/controls/menu/menu_controller.h
@@ -222,7 +222,7 @@ class VIEWS_EXPORT MenuController : public MessageLoop::Dispatcher {
#elif defined(USE_WAYLAND)
virtual base::MessagePumpDispatcher::DispatchStatus Dispatch(
ui::WaylandEvent* event);
-#elif defined(TOUCH_UI)
+#elif defined(TOUCH_UI) || defined(USE_AURA)
virtual base::MessagePumpDispatcher::DispatchStatus Dispatch(XEvent* xevent);
#else
virtual bool Dispatch(GdkEvent* event);
diff --git a/views/drag_utils_linux.cc b/views/drag_utils_linux.cc
new file mode 100644
index 0000000..aeeaf32
--- /dev/null
+++ b/views/drag_utils_linux.cc
@@ -0,0 +1,18 @@
+// 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/drag_utils.h"
+
+#include "base/logging.h"
+
+namespace drag_utils {
+
+void SetDragImageOnDataObject(const SkBitmap& bitmap,
+ const gfx::Size& size,
+ const gfx::Point& cursor_offset,
+ OSExchangeData* data_object) {
+ NOTIMPLEMENTED();
+}
+
+} // namespace drag_utils
diff --git a/views/views.gyp b/views/views.gyp
index cda9d27..e90ffbd 100644
--- a/views/views.gyp
+++ b/views/views.gyp
@@ -236,6 +236,7 @@
'drag_utils.cc',
'drag_utils.h',
'drag_utils_gtk.cc',
+ 'drag_utils_linux.cc',
'drag_utils_win.cc',
'events/event.cc',
'events/event.h',
@@ -417,6 +418,10 @@
'dependencies': [
'../aura/aura.gyp:aura',
],
+ 'sources/': [
+ ['exclude', '_(gtk|x)\\.cc$'],
+ ['exclude', '/(gtk|x)_[^/]*\\.cc$'],
+ ],
'sources!': [
'controls/menu/menu_2.cc',
'controls/menu/menu_2.h',
@@ -436,6 +441,8 @@
'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',
'widget/child_window_message_processor.cc',
@@ -451,6 +458,10 @@
],
}],
],
+ }, { # else: use_aura==1
+ 'sources!': [
+ 'drag_utils_linux.cc',
+ ]
}],
['toolkit_uses_gtk == 1', {
'dependencies': [
@@ -842,6 +853,7 @@
'target_name': 'views_aura_desktop',
'type': 'executable',
'dependencies': [
+ '../aura/aura.gyp:aura',
'../base/base.gyp:base',
'../base/base.gyp:base_i18n',
'../chrome/chrome.gyp:packed_resources',
diff --git a/views/window/dialog_client_view.cc b/views/window/dialog_client_view.cc
index 562c8cc..1f50eb2 100644
--- a/views/window/dialog_client_view.cc
+++ b/views/window/dialog_client_view.cc
@@ -312,7 +312,7 @@ const DialogClientView* DialogClientView::AsDialogClientView() const {
void DialogClientView::OnPaint(gfx::Canvas* canvas) {
#if defined(OS_WIN)
FillViewWithSysColor(canvas, this, GetSysColor(COLOR_3DFACE));
-#elif defined(USE_WAYLAND)
+#elif defined(USE_WAYLAND) || defined(USE_AURA)
SkColor sk_color = SkColorSetARGB(200, 255, 255, 255);
canvas->FillRectInt(sk_color, 0, 0, width(), height());
#else