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

Side by Side Diff: content/renderer/render_widget.cc

Issue 2208613002: Remove MOJO_SHELL_CLIENT define. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tot merge Created 4 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
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/renderer/render_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 #if defined(OS_ANDROID) 85 #if defined(OS_ANDROID)
86 #include <android/keycodes.h> 86 #include <android/keycodes.h>
87 #endif 87 #endif
88 88
89 #if defined(OS_POSIX) 89 #if defined(OS_POSIX)
90 #include "ipc/ipc_channel_posix.h" 90 #include "ipc/ipc_channel_posix.h"
91 #include "third_party/skia/include/core/SkMallocPixelRef.h" 91 #include "third_party/skia/include/core/SkMallocPixelRef.h"
92 #include "third_party/skia/include/core/SkPixelRef.h" 92 #include "third_party/skia/include/core/SkPixelRef.h"
93 #endif // defined(OS_POSIX) 93 #endif // defined(OS_POSIX)
94 94
95 #if defined(MOJO_SHELL_CLIENT) 95 #if defined(USE_AURA)
96 #include "content/public/common/mojo_shell_connection.h" 96 #include "content/public/common/mojo_shell_connection.h"
97 #include "content/renderer/mus/render_widget_mus_connection.h" 97 #include "content/renderer/mus/render_widget_mus_connection.h"
98 #endif 98 #endif
99 99
100 using blink::WebCompositionUnderline; 100 using blink::WebCompositionUnderline;
101 using blink::WebCursorInfo; 101 using blink::WebCursorInfo;
102 using blink::WebDeviceEmulationParams; 102 using blink::WebDeviceEmulationParams;
103 using blink::WebGestureEvent; 103 using blink::WebGestureEvent;
104 using blink::WebInputEvent; 104 using blink::WebInputEvent;
105 using blink::WebInputEventResult; 105 using blink::WebInputEventResult;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 bool IsDateTimeInput(ui::TextInputType type) { 192 bool IsDateTimeInput(ui::TextInputType type) {
193 return type == ui::TEXT_INPUT_TYPE_DATE || 193 return type == ui::TEXT_INPUT_TYPE_DATE ||
194 type == ui::TEXT_INPUT_TYPE_DATE_TIME || 194 type == ui::TEXT_INPUT_TYPE_DATE_TIME ||
195 type == ui::TEXT_INPUT_TYPE_DATE_TIME_LOCAL || 195 type == ui::TEXT_INPUT_TYPE_DATE_TIME_LOCAL ||
196 type == ui::TEXT_INPUT_TYPE_MONTH || 196 type == ui::TEXT_INPUT_TYPE_MONTH ||
197 type == ui::TEXT_INPUT_TYPE_TIME || type == ui::TEXT_INPUT_TYPE_WEEK; 197 type == ui::TEXT_INPUT_TYPE_TIME || type == ui::TEXT_INPUT_TYPE_WEEK;
198 } 198 }
199 199
200 content::RenderWidgetInputHandlerDelegate* GetRenderWidgetInputHandlerDelegate( 200 content::RenderWidgetInputHandlerDelegate* GetRenderWidgetInputHandlerDelegate(
201 content::RenderWidget* widget) { 201 content::RenderWidget* widget) {
202 #if defined(MOJO_SHELL_CLIENT) 202 #if defined(USE_AURA)
203 const base::CommandLine& cmdline = *base::CommandLine::ForCurrentProcess(); 203 const base::CommandLine& cmdline = *base::CommandLine::ForCurrentProcess();
204 if (content::MojoShellConnection::GetForProcess() && 204 if (content::MojoShellConnection::GetForProcess() &&
205 cmdline.HasSwitch(switches::kUseMusInRenderer)) { 205 cmdline.HasSwitch(switches::kUseMusInRenderer)) {
206 return content::RenderWidgetMusConnection::GetOrCreate( 206 return content::RenderWidgetMusConnection::GetOrCreate(
207 widget->routing_id()); 207 widget->routing_id());
208 } 208 }
209 #endif 209 #endif
210 // If we don't have a connection to the Mojo shell, then we want to route IPCs 210 // If we don't have a connection to the Mojo shell, then we want to route IPCs
211 // back to the browser process rather than Mus so we use the |widget| as the 211 // back to the browser process rather than Mus so we use the |widget| as the
212 // RenderWidgetInputHandlerDelegate. 212 // RenderWidgetInputHandlerDelegate.
(...skipping 1853 matching lines...) Expand 10 before | Expand all | Expand 10 after
2066 void RenderWidget::requestPointerUnlock() { 2066 void RenderWidget::requestPointerUnlock() {
2067 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get()); 2067 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get());
2068 } 2068 }
2069 2069
2070 bool RenderWidget::isPointerLocked() { 2070 bool RenderWidget::isPointerLocked() {
2071 return mouse_lock_dispatcher_->IsMouseLockedTo( 2071 return mouse_lock_dispatcher_->IsMouseLockedTo(
2072 webwidget_mouse_lock_target_.get()); 2072 webwidget_mouse_lock_target_.get());
2073 } 2073 }
2074 2074
2075 } // namespace content 2075 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698