diff options
author | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-03 23:39:54 +0000 |
---|---|---|
committer | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-03 23:39:54 +0000 |
commit | 1201dd0fcf84829c1098d1a9510e2b6fcba4125e (patch) | |
tree | ab7bd462a9df2366a9b3de5dda1f5c100638dd59 | |
parent | 43f8df45a704cc6a1fa6976baf4d1a139dc75e46 (diff) | |
download | chromium_src-1201dd0fcf84829c1098d1a9510e2b6fcba4125e.zip chromium_src-1201dd0fcf84829c1098d1a9510e2b6fcba4125e.tar.gz chromium_src-1201dd0fcf84829c1098d1a9510e2b6fcba4125e.tar.bz2 |
Change MessagePumpLinux to MessagePumpOzone
BUG=178543
TEST=None
R=ben@chromium.org
Review URL: https://codereview.chromium.org/14624010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198244 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | base/base.gyp | 2 | ||||
-rw-r--r-- | base/base.gypi | 10 | ||||
-rw-r--r-- | base/message_loop.h | 4 | ||||
-rw-r--r-- | base/message_pump_ozone.cc (renamed from base/message_pump_linux.cc) | 22 | ||||
-rw-r--r-- | base/message_pump_ozone.h (renamed from base/message_pump_linux.h) | 21 | ||||
-rw-r--r-- | build/build_config.h | 5 | ||||
-rw-r--r-- | build/common.gypi | 16 | ||||
-rw-r--r-- | ui/ui.gyp | 2 | ||||
-rw-r--r-- | webkit/glue/webkit_glue.gypi | 2 |
9 files changed, 30 insertions, 54 deletions
diff --git a/base/base.gyp b/base/base.gyp index 73b0793..0cbb086 100644 --- a/base/base.gyp +++ b/base/base.gyp @@ -747,7 +747,7 @@ 'message_pump_glib_unittest.cc', ] }], - ['use_messagepump_linux == 1', { + ['use_ozone == 1', { 'sources!': [ 'message_pump_glib_unittest.cc', ] diff --git a/base/base.gypi b/base/base.gypi index f74c619..151ff3d 100644 --- a/base/base.gypi +++ b/base/base.gypi @@ -292,10 +292,10 @@ 'message_pump.h', 'message_pump_android.cc', 'message_pump_android.h', - 'message_pump_linux.cc', - 'message_pump_linux.h', 'message_pump_default.cc', 'message_pump_default.h', + 'message_pump_ozone.cc', + 'message_pump_ozone.h', 'message_pump_win.cc', 'message_pump_win.h', 'metrics/sample_map.cc', @@ -732,15 +732,11 @@ 'string16.cc', ], },], - ['<(use_messagepump_linux) == 1', { + ['<(use_ozone) == 1', { 'sources!': [ 'message_pump_glib.cc', 'message_pump_aurax11.cc', ] - }, { # use_message_pump_linux!=1 - 'sources!': [ - 'message_pump_linux.cc', - ], }], ['OS == "linux" and >(nacl_untrusted_build)==0', { 'sources!': [ diff --git a/base/message_loop.h b/base/message_loop.h index 013d60f..f3ad3a5 100644 --- a/base/message_loop.h +++ b/base/message_loop.h @@ -34,8 +34,8 @@ #if defined(USE_AURA) && defined(USE_X11) && !defined(OS_NACL) #include "base/message_pump_aurax11.h" -#elif defined(USE_MESSAGEPUMP_LINUX) && !defined(OS_NACL) -#include "base/message_pump_linux.h" +#elif defined(USE_OZONE) && !defined(OS_NACL) +#include "base/message_pump_ozone.h" #else #include "base/message_pump_gtk.h" #endif diff --git a/base/message_pump_linux.cc b/base/message_pump_ozone.cc index 460c208..ca7f45d 100644 --- a/base/message_pump_linux.cc +++ b/base/message_pump_ozone.cc @@ -2,48 +2,48 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/message_pump_linux.h" +#include "base/message_pump_ozone.h" #include "base/logging.h" #include "base/message_loop.h" namespace base { -MessagePumpLinux::MessagePumpLinux() +MessagePumpOzone::MessagePumpOzone() : MessagePumpLibevent() { } -MessagePumpLinux::~MessagePumpLinux() { +MessagePumpOzone::~MessagePumpOzone() { } -void MessagePumpLinux::AddObserver(MessagePumpObserver* /* observer */) { +void MessagePumpOzone::AddObserver(MessagePumpObserver* /* observer */) { NOTIMPLEMENTED(); } -void MessagePumpLinux::RemoveObserver(MessagePumpObserver* /* observer */) { +void MessagePumpOzone::RemoveObserver(MessagePumpObserver* /* observer */) { NOTIMPLEMENTED(); } // static -MessagePumpLinux* MessagePumpLinux::Current() { +MessagePumpOzone* MessagePumpOzone::Current() { MessageLoopForUI* loop = MessageLoopForUI::current(); - return static_cast<MessagePumpLinux*>(loop->pump_ui()); + return static_cast<MessagePumpOzone*>(loop->pump_ui()); } -void MessagePumpLinux::AddDispatcherForRootWindow( +void MessagePumpOzone::AddDispatcherForRootWindow( MessagePumpDispatcher* dispatcher) { // Only one root window is supported. DCHECK(dispatcher_.size() == 0); dispatcher_.insert(dispatcher_.begin(),dispatcher); } -void MessagePumpLinux::RemoveDispatcherForRootWindow( +void MessagePumpOzone::RemoveDispatcherForRootWindow( MessagePumpDispatcher* dispatcher) { DCHECK(dispatcher_.size() == 1); dispatcher_.pop_back(); } -bool MessagePumpLinux::Dispatch(const base::NativeEvent& dev) { +bool MessagePumpOzone::Dispatch(const base::NativeEvent& dev) { if (dispatcher_.size() > 0) return dispatcher_[0]->Dispatch(dev); else @@ -51,7 +51,7 @@ bool MessagePumpLinux::Dispatch(const base::NativeEvent& dev) { } // This code assumes that the caller tracks the lifetime of the |dispatcher|. -void MessagePumpLinux::RunWithDispatcher( +void MessagePumpOzone::RunWithDispatcher( Delegate* delegate, MessagePumpDispatcher* dispatcher) { dispatcher_.push_back(dispatcher); Run(delegate); diff --git a/base/message_pump_linux.h b/base/message_pump_ozone.h index 222c80f..8fb2f1d 100644 --- a/base/message_pump_linux.h +++ b/base/message_pump_ozone.h @@ -2,11 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef BASE_MESSAGE_PUMP_LINUX_H_ -#define BASE_MESSAGE_PUMP_LINUX_H_ - - -#include "base/message_pump.h" +#ifndef BASE_MESSAGE_PUMP_OZONE_H_ +#define BASE_MESSAGE_PUMP_OZONE_H_ #include "base/memory/scoped_ptr.h" #include "base/memory/scoped_vector.h" @@ -19,13 +16,13 @@ namespace base { // This class implements a message-pump for processing events from input devices // Refer to MessagePump for further documentation. -class BASE_EXPORT MessagePumpLinux : public MessagePumpLibevent, +class BASE_EXPORT MessagePumpOzone : public MessagePumpLibevent, public MessagePumpDispatcher { public: - MessagePumpLinux(); + MessagePumpOzone(); // Returns the UI message pump. - static MessagePumpLinux* Current(); + static MessagePumpOzone* Current(); // Add/Remove the root window dispatcher. void AddDispatcherForRootWindow(MessagePumpDispatcher* dispatcher); @@ -42,14 +39,14 @@ class BASE_EXPORT MessagePumpLinux : public MessagePumpLibevent, virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE; private: - virtual ~MessagePumpLinux(); + virtual ~MessagePumpOzone(); std::vector<MessagePumpDispatcher*> dispatcher_; - DISALLOW_COPY_AND_ASSIGN(MessagePumpLinux); + DISALLOW_COPY_AND_ASSIGN(MessagePumpOzone); }; -typedef MessagePumpLinux MessagePumpForUI; +typedef MessagePumpOzone MessagePumpForUI; } // namespace base -#endif // BASE_MESSAGE_PUMP_LINUX_H_ +#endif // BASE_MESSAGE_PUMP_OZONE_H_ diff --git a/build/build_config.h b/build/build_config.h index 3ee3de5..fef6be5 100644 --- a/build/build_config.h +++ b/build/build_config.h @@ -68,11 +68,6 @@ #define OS_POSIX 1 #endif -#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && \ - !defined(OS_NACL) && !defined(USE_MESSAGEPUMP_LINUX) -#define USE_X11 1 // Use X for graphics. -#endif - // Use tcmalloc #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(NO_TCMALLOC) #define USE_TCMALLOC 1 diff --git a/build/common.gypi b/build/common.gypi index cf259c3..60321e2 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -27,9 +27,6 @@ # Whether or not we are building the Ash shell. 'use_ash%': 0, - # Whether or not we are using the embedded messagepump. - 'use_messagepump_linux%': 0, - # Use a raw surface abstraction. 'use_ozone%': 0, }, @@ -39,9 +36,6 @@ 'use_ash%': '<(use_ash)', 'use_ozone%': '<(use_ozone)', - # Whether or not we are using the /dev/input/event* message pump. - 'use_messagepump_linux%': '<(use_messagepump_linux)', - # Whether we are using Views Toolkit 'toolkit_views%': 0, @@ -101,7 +95,6 @@ 'chromeos%': '<(chromeos)', 'use_aura%': '<(use_aura)', 'use_ash%': '<(use_ash)', - 'use_messagepump_linux%': '<(use_messagepump_linux)', 'use_ozone%': '<(use_ozone)', 'use_openssl%': '<(use_openssl)', 'enable_viewport%': '<(enable_viewport)', @@ -140,7 +133,7 @@ }], # Set toolkit_uses_gtk for the Chromium browser on Linux. - ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_aura==0 and use_messagepump_linux==0', { + ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_aura==0 and use_ozone==0', { 'toolkit_uses_gtk%': 1, }, { 'toolkit_uses_gtk%': 0, @@ -186,7 +179,6 @@ 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)', 'use_aura%': '<(use_aura)', 'use_ash%': '<(use_ash)', - 'use_messagepump_linux%': '<(use_messagepump_linux)', 'use_ozone%': '<(use_ozone)', 'use_openssl%': '<(use_openssl)', 'enable_viewport%': '<(enable_viewport)', @@ -450,7 +442,7 @@ }], # Flags to use X11 on non-Mac POSIX platforms. - ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or use_messagepump_linux==1', { + ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or use_ozone==1', { 'use_x11%': 0, }, { 'use_x11%': 1, @@ -724,7 +716,6 @@ 'os_bsd%': '<(os_bsd)', 'os_posix%': '<(os_posix)', 'use_glib%': '<(use_glib)', - 'use_messagepump_linux%': '<(use_messagepump_linux)', 'use_ozone%': '<(use_ozone)', 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)', 'use_x11%': '<(use_x11)', @@ -1863,9 +1854,6 @@ ['use_ash==1', { 'defines': ['USE_ASH=1'], }], - ['use_messagepump_linux==1', { - 'defines': ['USE_MESSAGEPUMP_LINUX=1'], - }], ['use_ozone==1', { 'defines': ['USE_OZONE=1'], }], @@ -816,7 +816,7 @@ ['exclude', 'base/x/*'], ], }], - ['use_messagepump_linux==0', { + ['use_ozone==0', { 'sources!': [ 'base/cursor/cursor_null.cc', 'base/cursor/cursor_loader_null.cc', diff --git a/webkit/glue/webkit_glue.gypi b/webkit/glue/webkit_glue.gypi index b96ab96..93ec07c 100644 --- a/webkit/glue/webkit_glue.gypi +++ b/webkit/glue/webkit_glue.gypi @@ -407,7 +407,7 @@ 'libraries': [ '-lXcursor', ], }, }], - ['use_messagepump_linux==0', { + ['use_ozone==0', { 'sources!': [ 'webcursor_null.cc', ], |