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

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

Issue 769173002: Move native_viewport and gles2 service impls to //services (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 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 "mojo/services/native_viewport/native_viewport_impl.h" 5 #include "services/native_viewport/native_viewport_impl.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "base/time/time.h" 11 #include "base/time/time.h"
12 #include "mojo/converters/geometry/geometry_type_converters.h" 12 #include "mojo/converters/geometry/geometry_type_converters.h"
13 #include "mojo/converters/input_events/input_events_type_converters.h" 13 #include "mojo/converters/input_events/input_events_type_converters.h"
14 #include "mojo/converters/surfaces/surfaces_type_converters.h" 14 #include "mojo/converters/surfaces/surfaces_type_converters.h"
15 #include "mojo/public/cpp/application/application_delegate.h" 15 #include "mojo/public/cpp/application/application_delegate.h"
16 #include "mojo/public/cpp/application/application_impl.h" 16 #include "mojo/public/cpp/application/application_impl.h"
17 #include "mojo/public/cpp/application/interface_factory.h" 17 #include "mojo/public/cpp/application/interface_factory.h"
18 #include "mojo/services/native_viewport/platform_viewport_headless.h" 18 #include "services/native_viewport/platform_viewport_headless.h"
19 #include "mojo/services/native_viewport/viewport_surface.h" 19 #include "services/native_viewport/viewport_surface.h"
20 #include "ui/events/event.h" 20 #include "ui/events/event.h"
21 21
22 namespace mojo { 22 namespace mojo {
23 namespace { 23 namespace {
24 24
25 bool IsRateLimitedEventType(ui::Event* event) { 25 bool IsRateLimitedEventType(ui::Event* event) {
26 return event->type() == ui::ET_MOUSE_MOVED || 26 return event->type() == ui::ET_MOUSE_MOVED ||
27 event->type() == ui::ET_MOUSE_DRAGGED || 27 event->type() == ui::ET_MOUSE_DRAGGED ||
28 event->type() == ui::ET_TOUCH_MOVED; 28 event->type() == ui::ET_TOUCH_MOVED;
29 } 29 }
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 } 159 }
160 160
161 void NativeViewportImpl::ProcessOnBoundsChanged() { 161 void NativeViewportImpl::ProcessOnBoundsChanged() {
162 client()->OnSizeChanged(Size::From(size_)); 162 client()->OnSizeChanged(Size::From(size_));
163 if (viewport_surface_) 163 if (viewport_surface_)
164 viewport_surface_->SetSize(size_); 164 viewport_surface_->SetSize(size_);
165 } 165 }
166 166
167 } // namespace mojo 167 } // namespace mojo
168 168
OLDNEW
« no previous file with comments | « services/native_viewport/native_viewport_impl.h ('k') | services/native_viewport/platform_viewport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698