| Index: ui/base/clipboard/clipboard_aurax11.cc
|
| diff --git a/ui/base/clipboard/clipboard_aurax11.cc b/ui/base/clipboard/clipboard_aurax11.cc
|
| index c85c582d8506633024235ac684c369a5d2fd070c..71739df075286f3b0f759b0b96a20e82a1f7c04a 100644
|
| --- a/ui/base/clipboard/clipboard_aurax11.cc
|
| +++ b/ui/base/clipboard/clipboard_aurax11.cc
|
| @@ -15,8 +15,6 @@
|
| #include "base/memory/ref_counted_memory.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/memory/singleton.h"
|
| -#include "base/message_loop/message_pump_observer.h"
|
| -#include "base/message_loop/message_pump_x11.h"
|
| #include "base/stl_util.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "third_party/skia/include/core/SkBitmap.h"
|
| @@ -26,7 +24,8 @@
|
| #include "ui/base/x/selection_utils.h"
|
| #include "ui/base/x/x11_util.h"
|
| #include "ui/events/platform/platform_event_dispatcher.h"
|
| -#include "ui/events/platform/x11/x11_event_source.h"
|
| +#include "ui/events/platform/platform_event_observer.h"
|
| +#include "ui/events/platform/platform_event_source.h"
|
| #include "ui/gfx/codec/png_codec.h"
|
| #include "ui/gfx/size.h"
|
| #include "ui/gfx/x/x11_atom_cache.h"
|
| @@ -57,7 +56,7 @@ const char* kAtomsToCache[] = {
|
| ///////////////////////////////////////////////////////////////////////////////
|
|
|
| // Uses the XFixes API to provide sequence numbers for GetSequenceNumber().
|
| -class SelectionChangeObserver : public base::MessagePumpObserver {
|
| +class SelectionChangeObserver : public ui::PlatformEventObserver {
|
| public:
|
| static SelectionChangeObserver* GetInstance();
|
|
|
| @@ -72,10 +71,9 @@ class SelectionChangeObserver : public base::MessagePumpObserver {
|
| SelectionChangeObserver();
|
| virtual ~SelectionChangeObserver();
|
|
|
| - // Overridden from base::MessagePumpObserver:
|
| - virtual void WillProcessEvent(const base::NativeEvent& event) OVERRIDE;
|
| - virtual void DidProcessEvent(
|
| - const base::NativeEvent& event) OVERRIDE {}
|
| + // ui::PlatformEventObserver:
|
| + virtual void WillProcessEvent(const ui::PlatformEvent& event) OVERRIDE;
|
| + virtual void DidProcessEvent(const ui::PlatformEvent& event) OVERRIDE {}
|
|
|
| int event_base_;
|
| Atom clipboard_atom_;
|
| @@ -107,19 +105,19 @@ SelectionChangeObserver::SelectionChangeObserver()
|
| XFixesSelectionWindowDestroyNotifyMask |
|
| XFixesSelectionClientCloseNotifyMask);
|
|
|
| - base::MessagePumpX11::Current()->AddObserver(this);
|
| + ui::PlatformEventSource::GetInstance()->AddPlatformEventObserver(this);
|
| }
|
| }
|
|
|
| SelectionChangeObserver::~SelectionChangeObserver() {
|
| - // We are a singleton; we will outlive our message pump.
|
| + // We are a singleton; we will outlive the event source.
|
| }
|
|
|
| SelectionChangeObserver* SelectionChangeObserver::GetInstance() {
|
| return Singleton<SelectionChangeObserver>::get();
|
| }
|
|
|
| -void SelectionChangeObserver::WillProcessEvent(const base::NativeEvent& event) {
|
| +void SelectionChangeObserver::WillProcessEvent(const ui::PlatformEvent& event) {
|
| if (event->type == event_base_ + XFixesSelectionNotify) {
|
| XFixesSelectionNotifyEvent* ev =
|
| reinterpret_cast<XFixesSelectionNotifyEvent*>(event);
|
|
|