Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(423)

Side by Side Diff: content/shell/browser/shell_platform_data_aura.cc

Issue 147203004: aura: Remove event-dispatch methods from WindowTreeHostDelegate interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/shell/browser/shell_platform_data_aura.h" 5 #include "content/shell/browser/shell_platform_data_aura.h"
6 6
7 #include "content/shell/browser/shell.h" 7 #include "content/shell/browser/shell.h"
8 #include "ui/aura/client/aura_constants.h" 8 #include "ui/aura/client/aura_constants.h"
9 #include "ui/aura/client/default_activation_client.h" 9 #include "ui/aura/client/default_activation_client.h"
10 #include "ui/aura/client/default_capture_client.h" 10 #include "ui/aura/client/default_capture_client.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 static_cast<ui::TranslatedKeyEvent*>(event)->ConvertToKeyEvent(); 90 static_cast<ui::TranslatedKeyEvent*>(event)->ConvertToKeyEvent();
91 } else { 91 } else {
92 if (input_method_->DispatchKeyEvent(*event)) 92 if (input_method_->DispatchKeyEvent(*event))
93 event->StopPropagation(); 93 event->StopPropagation();
94 } 94 }
95 } 95 }
96 96
97 // ui::internal::InputMethodDelegate: 97 // ui::internal::InputMethodDelegate:
98 virtual bool DispatchKeyEventPostIME(const ui::KeyEvent& event) OVERRIDE { 98 virtual bool DispatchKeyEventPostIME(const ui::KeyEvent& event) OVERRIDE {
99 ui::TranslatedKeyEvent aura_event(event); 99 ui::TranslatedKeyEvent aura_event(event);
100 return root_->AsWindowTreeHostDelegate()->OnHostKeyEvent(&aura_event); 100 ui::EventDispatchDetails details = root_->OnEventFromSource(&aura_event);
101 return aura_event.handled() || details.dispatcher_destroyed;
101 } 102 }
102 103
103 aura::RootWindow* root_; 104 aura::RootWindow* root_;
104 scoped_ptr<ui::InputMethod> input_method_; 105 scoped_ptr<ui::InputMethod> input_method_;
105 106
106 DISALLOW_COPY_AND_ASSIGN(MinimalInputEventFilter); 107 DISALLOW_COPY_AND_ASSIGN(MinimalInputEventFilter);
107 }; 108 };
108 109
109 } 110 }
110 111
(...skipping 25 matching lines...) Expand all
136 root_window_->host()->Show(); 137 root_window_->host()->Show();
137 } 138 }
138 139
139 void ShellPlatformDataAura::ResizeWindow(const gfx::Size& size) { 140 void ShellPlatformDataAura::ResizeWindow(const gfx::Size& size) {
140 root_window_->host()->SetBounds(gfx::Rect(size)); 141 root_window_->host()->SetBounds(gfx::Rect(size));
141 } 142 }
142 143
143 144
144 145
145 } // namespace content 146 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_view_aura_browsertest.cc ('k') | mojo/examples/aura_demo/root_window_host_mojo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698