| Index: chrome/browser/ui/ash/event_rewriter.cc
|
| diff --git a/chrome/browser/ui/ash/event_rewriter.cc b/chrome/browser/ui/ash/event_rewriter.cc
|
| index 54e808cd1d14dd2d9877219bb8247c7825b8e97c..c28df4f4bf90efae186e149eea79f9cea7c4a73e 100644
|
| --- a/chrome/browser/ui/ash/event_rewriter.cc
|
| +++ b/chrome/browser/ui/ash/event_rewriter.cc
|
| @@ -170,8 +170,10 @@ EventRewriter::EventRewriter()
|
| #endif
|
| pref_service_(NULL) {
|
| // The ash shell isn't instantiated for our unit tests.
|
| - if (ash::Shell::HasInstance())
|
| - ash::Shell::GetPrimaryRootWindow()->AddRootWindowObserver(this);
|
| + if (ash::Shell::HasInstance()) {
|
| + ash::Shell::GetPrimaryRootWindow()->GetDispatcher()->
|
| + AddRootWindowObserver(this);
|
| + }
|
| #if defined(OS_CHROMEOS)
|
| if (base::SysInfo::IsRunningOnChromeOS()) {
|
| chromeos::XInputHierarchyChangedEventListener::GetInstance()
|
| @@ -182,8 +184,10 @@ EventRewriter::EventRewriter()
|
| }
|
|
|
| EventRewriter::~EventRewriter() {
|
| - if (ash::Shell::HasInstance())
|
| - ash::Shell::GetPrimaryRootWindow()->RemoveRootWindowObserver(this);
|
| + if (ash::Shell::HasInstance()) {
|
| + ash::Shell::GetPrimaryRootWindow()->GetDispatcher()->
|
| + RemoveRootWindowObserver(this);
|
| + }
|
| #if defined(OS_CHROMEOS)
|
| if (base::SysInfo::IsRunningOnChromeOS()) {
|
| chromeos::XInputHierarchyChangedEventListener::GetInstance()
|
|
|