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

Side by Side Diff: services/native_viewport/platform_viewport_x11.cc

Issue 1285183008: Ozone integration. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 4 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
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 "services/native_viewport/platform_viewport.h" 5 #include "services/native_viewport/platform_viewport.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "mojo/converters/geometry/geometry_type_converters.h" 9 #include "mojo/converters/geometry/geometry_type_converters.h"
10 #include "mojo/converters/input_events/input_events_type_converters.h" 10 #include "mojo/converters/input_events/input_events_type_converters.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 } 137 }
138 138
139 void OnCloseRequest() override { platform_window_->Close(); } 139 void OnCloseRequest() override { platform_window_->Close(); }
140 140
141 void OnClosed() override { delegate_->OnDestroyed(); } 141 void OnClosed() override { delegate_->OnDestroyed(); }
142 142
143 void OnWindowStateChanged(ui::PlatformWindowState state) override {} 143 void OnWindowStateChanged(ui::PlatformWindowState state) override {}
144 144
145 void OnLostCapture() override {} 145 void OnLostCapture() override {}
146 146
147 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) override { 147 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget,
148 float device_pixel_ratio) override {
jamesr 2015/08/18 20:11:33 ick, can we avoid having this? or do we need this
spang 2015/08/18 20:25:31 We don't need it - it always passes 1.f. On CrOS i
148 delegate_->OnAcceleratedWidgetAvailable(widget); 149 delegate_->OnAcceleratedWidgetAvailable(widget);
149 } 150 }
150 151
151 void OnActivationChanged(bool active) override {} 152 void OnActivationChanged(bool active) override {}
152 153
153 scoped_ptr<ui::PlatformEventSource> event_source_; 154 scoped_ptr<ui::PlatformEventSource> event_source_;
154 scoped_ptr<ui::PlatformWindow> platform_window_; 155 scoped_ptr<ui::PlatformWindow> platform_window_;
155 Delegate* delegate_; 156 Delegate* delegate_;
156 mojo::ViewportMetricsPtr metrics_; 157 mojo::ViewportMetricsPtr metrics_;
157 158
158 DISALLOW_COPY_AND_ASSIGN(PlatformViewportX11); 159 DISALLOW_COPY_AND_ASSIGN(PlatformViewportX11);
159 }; 160 };
160 161
161 // static 162 // static
162 scoped_ptr<PlatformViewport> PlatformViewport::Create( 163 scoped_ptr<PlatformViewport> PlatformViewport::Create(
163 mojo::ApplicationImpl* application_, 164 mojo::ApplicationImpl* application_,
164 Delegate* delegate) { 165 Delegate* delegate) {
165 return make_scoped_ptr(new PlatformViewportX11(delegate)); 166 return make_scoped_ptr(new PlatformViewportX11(delegate));
166 } 167 }
167 168
168 } // namespace native_viewport 169 } // namespace native_viewport
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698