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

Side by Side Diff: ui/aura/root_window_host_ozone.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
« no previous file with comments | « ui/aura/root_window.cc ('k') | ui/aura/root_window_host_win.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ui/aura/root_window_host_ozone.h" 5 #include "ui/aura/root_window_host_ozone.h"
6 6
7 #include "ui/aura/root_window.h" 7 #include "ui/aura/root_window.h"
8 #include "ui/events/ozone/event_factory_ozone.h" 8 #include "ui/events/ozone/event_factory_ozone.h"
9 #include "ui/gfx/ozone/surface_factory_ozone.h" 9 #include "ui/gfx/ozone/surface_factory_ozone.h"
10 #include "ui/ozone/ozone_platform.h" 10 #include "ui/ozone/ozone_platform.h"
(...skipping 20 matching lines...) Expand all
31 CreateCompositor(GetAcceleratedWidget()); 31 CreateCompositor(GetAcceleratedWidget());
32 } 32 }
33 33
34 WindowTreeHostOzone::~WindowTreeHostOzone() { 34 WindowTreeHostOzone::~WindowTreeHostOzone() {
35 base::MessagePumpOzone::Current()->RemoveDispatcherForRootWindow(0); 35 base::MessagePumpOzone::Current()->RemoveDispatcherForRootWindow(0);
36 DestroyCompositor(); 36 DestroyCompositor();
37 } 37 }
38 38
39 bool WindowTreeHostOzone::Dispatch(const base::NativeEvent& ne) { 39 bool WindowTreeHostOzone::Dispatch(const base::NativeEvent& ne) {
40 ui::Event* event = static_cast<ui::Event*>(ne); 40 ui::Event* event = static_cast<ui::Event*>(ne);
41 if (event->IsTouchEvent()) { 41 SendEventToProcessor(event);
42 ui::TouchEvent* touchev = static_cast<ui::TouchEvent*>(ne);
43 delegate_->OnHostTouchEvent(touchev);
44 } else if (event->IsKeyEvent()) {
45 ui::KeyEvent* keyev = static_cast<ui::KeyEvent*>(ne);
46 delegate_->OnHostKeyEvent(keyev);
47 } else if (event->IsMouseEvent()) {
48 ui::MouseEvent* mouseev = static_cast<ui::MouseEvent*>(ne);
49 delegate_->OnHostMouseEvent(mouseev);
50 }
51 return true; 42 return true;
52 } 43 }
53 44
54 RootWindow* WindowTreeHostOzone::GetRootWindow() { 45 RootWindow* WindowTreeHostOzone::GetRootWindow() {
55 return delegate_->AsRootWindow(); 46 return delegate_->AsRootWindow();
56 } 47 }
57 48
58 gfx::AcceleratedWidget WindowTreeHostOzone::GetAcceleratedWidget() { 49 gfx::AcceleratedWidget WindowTreeHostOzone::GetAcceleratedWidget() {
59 return widget_; 50 return widget_;
60 } 51 }
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 return new WindowTreeHostOzone(bounds); 117 return new WindowTreeHostOzone(bounds);
127 } 118 }
128 119
129 // static 120 // static
130 gfx::Size WindowTreeHost::GetNativeScreenSize() { 121 gfx::Size WindowTreeHost::GetNativeScreenSize() {
131 NOTIMPLEMENTED(); 122 NOTIMPLEMENTED();
132 return gfx::Size(); 123 return gfx::Size();
133 } 124 }
134 125
135 } // namespace aura 126 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/root_window.cc ('k') | ui/aura/root_window_host_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698