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

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

Issue 640893003: Move mojo/services/public/cpp TypeConverters to mojo/converters. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restore the directory and component structures and target names. Created 6 years, 2 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 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 "mojo/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"
13 #include "mojo/converters/input_events/input_events_type_converters.h"
14 #include "mojo/converters/surfaces/surfaces_type_converters.h"
12 #include "mojo/public/cpp/application/application_delegate.h" 15 #include "mojo/public/cpp/application/application_delegate.h"
13 #include "mojo/public/cpp/application/application_impl.h" 16 #include "mojo/public/cpp/application/application_impl.h"
14 #include "mojo/public/cpp/application/interface_factory.h" 17 #include "mojo/public/cpp/application/interface_factory.h"
15 #include "mojo/services/native_viewport/platform_viewport_headless.h" 18 #include "mojo/services/native_viewport/platform_viewport_headless.h"
16 #include "mojo/services/native_viewport/viewport_surface.h" 19 #include "mojo/services/native_viewport/viewport_surface.h"
17 #include "mojo/services/public/cpp/geometry/geometry_type_converters.h"
18 #include "mojo/services/public/cpp/input_events/input_events_type_converters.h"
19 #include "mojo/services/public/cpp/surfaces/surfaces_type_converters.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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 } 151 }
152 152
153 void NativeViewportImpl::ProcessOnBoundsChanged() { 153 void NativeViewportImpl::ProcessOnBoundsChanged() {
154 client()->OnSizeChanged(Size::From(size_)); 154 client()->OnSizeChanged(Size::From(size_));
155 if (viewport_surface_) 155 if (viewport_surface_)
156 viewport_surface_->SetSize(size_); 156 viewport_surface_->SetSize(size_);
157 } 157 }
158 158
159 } // namespace mojo 159 } // namespace mojo
160 160
OLDNEW
« no previous file with comments | « mojo/services/native_viewport/gpu_impl.cc ('k') | mojo/services/native_viewport/platform_viewport_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698