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

Side by Side Diff: components/view_manager/native_viewport/platform_viewport_win.cc

Issue 1149083010: Mandoline: Remove native_viewport.mojom (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Windows Build I hope Created 5 years, 6 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 "components/view_manager/native_viewport/platform_viewport.h" 5 #include "components/view_manager/native_viewport/platform_viewport.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "components/view_manager/public/interfaces/view_manager.mojom.h"
8 #include "mojo/converters/geometry/geometry_type_converters.h" 9 #include "mojo/converters/geometry/geometry_type_converters.h"
9 #include "mojo/converters/input_events/input_events_type_converters.h" 10 #include "mojo/converters/input_events/input_events_type_converters.h"
10 #include "ui/events/event.h" 11 #include "ui/events/event.h"
11 #include "ui/gfx/geometry/rect.h" 12 #include "ui/gfx/geometry/rect.h"
12 #include "ui/platform_window/platform_window_delegate.h" 13 #include "ui/platform_window/platform_window_delegate.h"
13 #include "ui/platform_window/win/win_window.h" 14 #include "ui/platform_window/win/win_window.h"
14 15
15 namespace native_viewport { 16 namespace native_viewport {
16 namespace { 17 namespace {
17 float ConvertUIWheelValueToMojoValue(int offset) { 18 float ConvertUIWheelValueToMojoValue(int offset) {
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 void OnActivationChanged(bool active) override {} 127 void OnActivationChanged(bool active) override {}
127 128
128 scoped_ptr<ui::PlatformWindow> platform_window_; 129 scoped_ptr<ui::PlatformWindow> platform_window_;
129 Delegate* delegate_; 130 Delegate* delegate_;
130 mojo::ViewportMetricsPtr metrics_; 131 mojo::ViewportMetricsPtr metrics_;
131 132
132 DISALLOW_COPY_AND_ASSIGN(PlatformViewportWin); 133 DISALLOW_COPY_AND_ASSIGN(PlatformViewportWin);
133 }; 134 };
134 135
135 // static 136 // static
136 scoped_ptr<PlatformViewport> PlatformViewport::Create(Delegate* delegate) { 137 scoped_ptr<PlatformViewport> PlatformViewport::Create(Delegate* delegate,
138 bool headless) {
139 if (headless)
140 return PlatformViewportHeadless::Create(delegate);
137 return scoped_ptr<PlatformViewport>(new PlatformViewportWin(delegate)).Pass(); 141 return scoped_ptr<PlatformViewport>(new PlatformViewportWin(delegate)).Pass();
138 } 142 }
139 143
140 } // namespace native_viewport 144 } // namespace native_viewport
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698