OLD | NEW |
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 Loading... |
85 #include <android/keycodes.h> | 85 #include <android/keycodes.h> |
86 #endif | 86 #endif |
87 | 87 |
88 #if defined(OS_POSIX) | 88 #if defined(OS_POSIX) |
89 #include "ipc/ipc_channel_posix.h" | 89 #include "ipc/ipc_channel_posix.h" |
90 #include "third_party/skia/include/core/SkMallocPixelRef.h" | 90 #include "third_party/skia/include/core/SkMallocPixelRef.h" |
91 #include "third_party/skia/include/core/SkPixelRef.h" | 91 #include "third_party/skia/include/core/SkPixelRef.h" |
92 #endif // defined(OS_POSIX) | 92 #endif // defined(OS_POSIX) |
93 | 93 |
94 #if defined(USE_AURA) | 94 #if defined(USE_AURA) |
95 #include "content/public/common/mojo_shell_connection.h" | 95 #include "content/public/common/service_manager_connection.h" |
96 #include "content/renderer/mus/render_widget_mus_connection.h" | 96 #include "content/renderer/mus/render_widget_mus_connection.h" |
97 #endif | 97 #endif |
98 | 98 |
99 #if defined(OS_MACOSX) | 99 #if defined(OS_MACOSX) |
100 #include "content/renderer/text_input_client_observer.h" | 100 #include "content/renderer/text_input_client_observer.h" |
101 #endif | 101 #endif |
102 | 102 |
103 using blink::WebCompositionUnderline; | 103 using blink::WebCompositionUnderline; |
104 using blink::WebCursorInfo; | 104 using blink::WebCursorInfo; |
105 using blink::WebDeviceEmulationParams; | 105 using blink::WebDeviceEmulationParams; |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 singleton->map().find(input_mode.utf8()); | 188 singleton->map().find(input_mode.utf8()); |
189 if (it == singleton->map().end()) | 189 if (it == singleton->map().end()) |
190 return ui::TEXT_INPUT_MODE_DEFAULT; | 190 return ui::TEXT_INPUT_MODE_DEFAULT; |
191 return it->second; | 191 return it->second; |
192 } | 192 } |
193 | 193 |
194 content::RenderWidgetInputHandlerDelegate* GetRenderWidgetInputHandlerDelegate( | 194 content::RenderWidgetInputHandlerDelegate* GetRenderWidgetInputHandlerDelegate( |
195 content::RenderWidget* widget) { | 195 content::RenderWidget* widget) { |
196 #if defined(USE_AURA) | 196 #if defined(USE_AURA) |
197 const base::CommandLine& cmdline = *base::CommandLine::ForCurrentProcess(); | 197 const base::CommandLine& cmdline = *base::CommandLine::ForCurrentProcess(); |
198 if (content::MojoShellConnection::GetForProcess() && | 198 if (content::ServiceManagerConnection::GetForProcess() && |
199 cmdline.HasSwitch(switches::kUseMusInRenderer)) { | 199 cmdline.HasSwitch(switches::kUseMusInRenderer)) { |
200 return content::RenderWidgetMusConnection::GetOrCreate( | 200 return content::RenderWidgetMusConnection::GetOrCreate( |
201 widget->routing_id()); | 201 widget->routing_id()); |
202 } | 202 } |
203 #endif | 203 #endif |
204 // If we don't have a connection to the Mojo shell, then we want to route IPCs | 204 // If we don't have a connection to the Service Manager, then we want to route |
205 // back to the browser process rather than Mus so we use the |widget| as the | 205 // IPCs back to the browser process rather than Mus so we use the |widget| as |
206 // RenderWidgetInputHandlerDelegate. | 206 // the RenderWidgetInputHandlerDelegate. |
207 return widget; | 207 return widget; |
208 } | 208 } |
209 | 209 |
210 content::RenderWidget::CreateRenderWidgetFunction g_create_render_widget = | 210 content::RenderWidget::CreateRenderWidgetFunction g_create_render_widget = |
211 nullptr; | 211 nullptr; |
212 | 212 |
213 content::RenderWidget::RenderWidgetInitializedCallback | 213 content::RenderWidget::RenderWidgetInitializedCallback |
214 g_render_widget_initialized = nullptr; | 214 g_render_widget_initialized = nullptr; |
215 | 215 |
216 } // namespace | 216 } // namespace |
(...skipping 1976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2193 bool RenderWidget::isPointerLocked() { | 2193 bool RenderWidget::isPointerLocked() { |
2194 return mouse_lock_dispatcher_->IsMouseLockedTo( | 2194 return mouse_lock_dispatcher_->IsMouseLockedTo( |
2195 webwidget_mouse_lock_target_.get()); | 2195 webwidget_mouse_lock_target_.get()); |
2196 } | 2196 } |
2197 | 2197 |
2198 blink::WebWidget* RenderWidget::GetWebWidget() const { | 2198 blink::WebWidget* RenderWidget::GetWebWidget() const { |
2199 return webwidget_internal_; | 2199 return webwidget_internal_; |
2200 } | 2200 } |
2201 | 2201 |
2202 } // namespace content | 2202 } // namespace content |
OLD | NEW |