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

Side by Side Diff: ui/aura/root_window_host_ozone.cc

Issue 72503002: Remove some pass-thrus on RootWindow API in favor of exposing the RootWindowHost again. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 1 month 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_host_ozone.h ('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/gfx/ozone/surface_factory_ozone.h" 8 #include "ui/gfx/ozone/surface_factory_ozone.h"
9 #include "ui/ozone/ozone_platform.h" 9 #include "ui/ozone/ozone_platform.h"
10 10
11 namespace aura { 11 namespace aura {
12 12
13 RootWindowHostOzone::RootWindowHostOzone(const gfx::Rect& bounds) 13 RootWindowHostOzone::RootWindowHostOzone(const gfx::Rect& bounds)
14 : delegate_(NULL), widget_(0), bounds_(bounds) { 14 : widget_(0),
15 bounds_(bounds) {
15 ui::OzonePlatform::Initialize(); 16 ui::OzonePlatform::Initialize();
16 factory_.reset(ui::EventFactoryOzone::GetInstance()); 17 factory_.reset(ui::EventFactoryOzone::GetInstance());
17 factory_->StartProcessingEvents(); 18 factory_->StartProcessingEvents();
18 gfx::SurfaceFactoryOzone* surface_factory = 19 gfx::SurfaceFactoryOzone* surface_factory =
19 gfx::SurfaceFactoryOzone::GetInstance(); 20 gfx::SurfaceFactoryOzone::GetInstance();
20 widget_ = surface_factory->GetAcceleratedWidget(); 21 widget_ = surface_factory->GetAcceleratedWidget();
21 22
22 surface_factory->AttemptToResizeAcceleratedWidget(widget_, bounds_); 23 surface_factory->AttemptToResizeAcceleratedWidget(widget_, bounds_);
23 24
24 base::MessagePumpOzone::Current()->AddDispatcherForRootWindow(this); 25 base::MessagePumpOzone::Current()->AddDispatcherForRootWindow(this);
(...skipping 11 matching lines...) Expand all
36 } else if (event->IsKeyEvent()) { 37 } else if (event->IsKeyEvent()) {
37 ui::KeyEvent* keyev = static_cast<ui::KeyEvent*>(ne); 38 ui::KeyEvent* keyev = static_cast<ui::KeyEvent*>(ne);
38 delegate_->OnHostKeyEvent(keyev); 39 delegate_->OnHostKeyEvent(keyev);
39 } else if (event->IsMouseEvent()) { 40 } else if (event->IsMouseEvent()) {
40 ui::MouseEvent* mouseev = static_cast<ui::MouseEvent*>(ne); 41 ui::MouseEvent* mouseev = static_cast<ui::MouseEvent*>(ne);
41 delegate_->OnHostMouseEvent(mouseev); 42 delegate_->OnHostMouseEvent(mouseev);
42 } 43 }
43 return true; 44 return true;
44 } 45 }
45 46
46 void RootWindowHostOzone::SetDelegate(RootWindowHostDelegate* delegate) {
47 delegate_ = delegate;
48 }
49
50 RootWindow* RootWindowHostOzone::GetRootWindow() { 47 RootWindow* RootWindowHostOzone::GetRootWindow() {
51 return delegate_->AsRootWindow(); 48 return delegate_->AsRootWindow();
52 } 49 }
53 50
54 gfx::AcceleratedWidget RootWindowHostOzone::GetAcceleratedWidget() { 51 gfx::AcceleratedWidget RootWindowHostOzone::GetAcceleratedWidget() {
55 return widget_; 52 return widget_;
56 } 53 }
57 54
58 void RootWindowHostOzone::Show() { NOTIMPLEMENTED(); } 55 void RootWindowHostOzone::Show() { NOTIMPLEMENTED(); }
59 56
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 void RootWindowHostOzone::UnConfineCursor() { NOTIMPLEMENTED(); } 95 void RootWindowHostOzone::UnConfineCursor() { NOTIMPLEMENTED(); }
99 96
100 void RootWindowHostOzone::OnCursorVisibilityChanged(bool show) { 97 void RootWindowHostOzone::OnCursorVisibilityChanged(bool show) {
101 NOTIMPLEMENTED(); 98 NOTIMPLEMENTED();
102 } 99 }
103 100
104 void RootWindowHostOzone::MoveCursorTo(const gfx::Point& location) { 101 void RootWindowHostOzone::MoveCursorTo(const gfx::Point& location) {
105 NOTIMPLEMENTED(); 102 NOTIMPLEMENTED();
106 } 103 }
107 104
108 void RootWindowHostOzone::SetFocusWhenShown(bool focus_when_shown) {
109 NOTIMPLEMENTED();
110 }
111
112 void RootWindowHostOzone::PostNativeEvent( 105 void RootWindowHostOzone::PostNativeEvent(
113 const base::NativeEvent& native_event) { 106 const base::NativeEvent& native_event) {
114 NOTIMPLEMENTED(); 107 NOTIMPLEMENTED();
115 } 108 }
116 109
117 void RootWindowHostOzone::OnDeviceScaleFactorChanged( 110 void RootWindowHostOzone::OnDeviceScaleFactorChanged(
118 float device_scale_factor) { 111 float device_scale_factor) {
119 NOTIMPLEMENTED(); 112 NOTIMPLEMENTED();
120 } 113 }
121 114
122 void RootWindowHostOzone::PrepareForShutdown() { NOTIMPLEMENTED(); } 115 void RootWindowHostOzone::PrepareForShutdown() { NOTIMPLEMENTED(); }
123 116
124 // static 117 // static
125 RootWindowHost* RootWindowHost::Create(const gfx::Rect& bounds) { 118 RootWindowHost* RootWindowHost::Create(const gfx::Rect& bounds) {
126 return new RootWindowHostOzone(bounds); 119 return new RootWindowHostOzone(bounds);
127 } 120 }
128 121
129 // static 122 // static
130 gfx::Size RootWindowHost::GetNativeScreenSize() { 123 gfx::Size RootWindowHost::GetNativeScreenSize() {
131 NOTIMPLEMENTED(); 124 NOTIMPLEMENTED();
132 return gfx::Size(); 125 return gfx::Size();
133 } 126 }
134 127
135 } // namespace aura 128 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/root_window_host_ozone.h ('k') | ui/aura/root_window_host_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698