diff options
author | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-30 16:57:21 +0000 |
---|---|---|
committer | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-30 16:57:21 +0000 |
commit | 4168ad750ebe1bf59b29fd82dc9425c016a404e6 (patch) | |
tree | b2fafca54811b5206c182202cb4eb8148e147566 /ash/shell.cc | |
parent | 9002fe205e37e1cd08480e83987e36482945958a (diff) | |
download | chromium_src-4168ad750ebe1bf59b29fd82dc9425c016a404e6.zip chromium_src-4168ad750ebe1bf59b29fd82dc9425c016a404e6.tar.gz chromium_src-4168ad750ebe1bf59b29fd82dc9425c016a404e6.tar.bz2 |
Merge aura::DispatcherLinux into base::MessagePumpAuraX11.
The majority of incoming XEvents are related to specific XWindows and need to
be sent to a specific MessagePumpDispatcher. MessagePumpAuraX11 would pass the
XEvent to aura::DispatcherLinux, which would pass it to the next
dispatcher. Because of the chromeos unit tests, which spin up a new XDisplay on
each test, these two objects need to have equivalent lifetimes. Due to the
incoming clipboard support (which this patch was split off from),
DispatcherLinux can't live in aura:: anymore. The solution is to merge the two
objects that have to have equivalent lifetimes together.
The one ui:: specific check was split off into an MessagePumpObserver. This also got rid of those hacks where we would static downcast to DispatcherLinux
from MessagePumpDispatcher.
BUG=130805
Review URL: https://chromiumcodereview.appspot.com/10895020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154174 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shell.cc')
-rw-r--r-- | ash/shell.cc | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/ash/shell.cc b/ash/shell.cc index f7e2f62..8c7b810 100644 --- a/ash/shell.cc +++ b/ash/shell.cc @@ -100,8 +100,8 @@ #if defined(OS_CHROMEOS) #include "ash/display/output_configurator_animation.h" +#include "base/message_pump_aurax11.h" #include "chromeos/display/output_configurator.h" -#include "ui/aura/dispatcher_linux.h" #endif // defined(OS_CHROMEOS) namespace ash { @@ -196,9 +196,8 @@ Shell::Shell(ShellDelegate* delegate) ui_controls::InstallUIControlsAura(internal::CreateUIControls()); #if defined(OS_CHROMEOS) output_configurator_->AddObserver(output_configurator_animation_.get()); - static_cast<aura::DispatcherLinux*>( - aura::Env::GetInstance()->GetDispatcher())->AddDispatcherForRootWindow( - output_configurator()); + base::MessagePumpAuraX11::Current()->AddDispatcherForRootWindow( + output_configurator()); #endif // defined(OS_CHROMEOS) } @@ -278,10 +277,8 @@ Shell::~Shell() { #if defined(OS_CHROMEOS) output_configurator_->RemoveObserver(output_configurator_animation_.get()); - // Remove OutputConfigurator from Dispatcher. - static_cast<aura::DispatcherLinux*>( - aura::Env::GetInstance()->GetDispatcher())->RemoveDispatcherForRootWindow( - output_configurator()); + base::MessagePumpAuraX11::Current()->RemoveDispatcherForRootWindow( + output_configurator()); #endif // defined(OS_CHROMEOS) } |