OLD | NEW |
---|---|
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 "content/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
121 #include "content/renderer/render_thread_impl.h" | 121 #include "content/renderer/render_thread_impl.h" |
122 #include "content/renderer/render_view_impl.h" | 122 #include "content/renderer/render_view_impl.h" |
123 #include "content/renderer/render_widget_fullscreen_pepper.h" | 123 #include "content/renderer/render_widget_fullscreen_pepper.h" |
124 #include "content/renderer/renderer_webapplicationcachehost_impl.h" | 124 #include "content/renderer/renderer_webapplicationcachehost_impl.h" |
125 #include "content/renderer/renderer_webcolorchooser_impl.h" | 125 #include "content/renderer/renderer_webcolorchooser_impl.h" |
126 #include "content/renderer/savable_resources.h" | 126 #include "content/renderer/savable_resources.h" |
127 #include "content/renderer/screen_orientation/screen_orientation_dispatcher.h" | 127 #include "content/renderer/screen_orientation/screen_orientation_dispatcher.h" |
128 #include "content/renderer/shared_worker_repository.h" | 128 #include "content/renderer/shared_worker_repository.h" |
129 #include "content/renderer/skia_benchmarking_extension.h" | 129 #include "content/renderer/skia_benchmarking_extension.h" |
130 #include "content/renderer/stats_collection_controller.h" | 130 #include "content/renderer/stats_collection_controller.h" |
131 #include "content/renderer/text_input_client_observer.h" | |
131 #include "content/renderer/web_frame_utils.h" | 132 #include "content/renderer/web_frame_utils.h" |
132 #include "content/renderer/web_ui_extension.h" | 133 #include "content/renderer/web_ui_extension.h" |
133 #include "content/renderer/websharedworker_proxy.h" | 134 #include "content/renderer/websharedworker_proxy.h" |
134 #include "content/renderer/websockethandle_impl.h" | 135 #include "content/renderer/websockethandle_impl.h" |
135 #include "crypto/sha2.h" | 136 #include "crypto/sha2.h" |
136 #include "gin/modules/module_registry.h" | 137 #include "gin/modules/module_registry.h" |
137 #include "media/audio/audio_output_device.h" | 138 #include "media/audio/audio_output_device.h" |
138 #include "media/base/audio_renderer_mixer_input.h" | 139 #include "media/base/audio_renderer_mixer_input.h" |
139 #include "media/base/cdm_factory.h" | 140 #include "media/base/cdm_factory.h" |
140 #include "media/base/decoder_factory.h" | 141 #include "media/base/decoder_factory.h" |
(...skipping 6170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6311 } | 6312 } |
6312 | 6313 |
6313 void RenderFrameImpl::OnSetPepperVolume(int32_t pp_instance, double volume) { | 6314 void RenderFrameImpl::OnSetPepperVolume(int32_t pp_instance, double volume) { |
6314 PepperPluginInstanceImpl* instance = static_cast<PepperPluginInstanceImpl*>( | 6315 PepperPluginInstanceImpl* instance = static_cast<PepperPluginInstanceImpl*>( |
6315 PepperPluginInstance::Get(pp_instance)); | 6316 PepperPluginInstance::Get(pp_instance)); |
6316 if (instance) | 6317 if (instance) |
6317 instance->audio_controller().SetVolume(volume); | 6318 instance->audio_controller().SetVolume(volume); |
6318 } | 6319 } |
6319 #endif // ENABLE_PLUGINS | 6320 #endif // ENABLE_PLUGINS |
6320 | 6321 |
6322 #if defined(OS_MACOSX) | |
6323 void RenderFrameImpl::OnTextInputClientMessageReceived( | |
6324 RenderWidget* render_widget, | |
6325 const IPC::Message& message) { | |
6326 if (render_widget_ == render_widget) { | |
6327 // Only the local root owning the widget should handle these messages. | |
Charlie Reis
2016/09/02 21:57:47
This comment refers to the previous line and shoul
EhsanK
2016/09/08 17:10:40
Done.
| |
6328 if (!text_input_client_observer_) { | |
6329 text_input_client_observer_.reset(new TextInputClientObserver(this)); | |
6330 } | |
6331 text_input_client_observer_->OnMessageReceived(message); | |
6332 } | |
6333 } | |
6334 #endif | |
6335 | |
6321 void RenderFrameImpl::RenderWidgetSetFocus(bool enable) { | 6336 void RenderFrameImpl::RenderWidgetSetFocus(bool enable) { |
6322 #if defined(ENABLE_PLUGINS) | 6337 #if defined(ENABLE_PLUGINS) |
6323 // Notify all Pepper plugins. | 6338 // Notify all Pepper plugins. |
6324 for (auto* plugin : active_pepper_instances_) | 6339 for (auto* plugin : active_pepper_instances_) |
6325 plugin->SetContentAreaFocus(enable); | 6340 plugin->SetContentAreaFocus(enable); |
6326 #endif | 6341 #endif |
6327 } | 6342 } |
6328 | 6343 |
6329 void RenderFrameImpl::RenderWidgetWillHandleMouseEvent() { | 6344 void RenderFrameImpl::RenderWidgetWillHandleMouseEvent() { |
6330 #if defined(ENABLE_PLUGINS) | 6345 #if defined(ENABLE_PLUGINS) |
6331 // This method is called for every mouse event that the RenderWidget receives. | 6346 // This method is called for every mouse event that the RenderWidget receives. |
6332 // And then the mouse event is forwarded to blink, which dispatches it to the | 6347 // And then the mouse event is forwarded to blink, which dispatches it to the |
6333 // event target. Potentially a Pepper plugin will receive the event. | 6348 // event target. Potentially a Pepper plugin will receive the event. |
6334 // In order to tell whether a plugin gets the last mouse event and which it | 6349 // In order to tell whether a plugin gets the last mouse event and which it |
6335 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6350 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6336 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6351 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6337 // |pepper_last_mouse_event_target_|. | 6352 // |pepper_last_mouse_event_target_|. |
6338 pepper_last_mouse_event_target_ = nullptr; | 6353 pepper_last_mouse_event_target_ = nullptr; |
6339 #endif | 6354 #endif |
6340 } | 6355 } |
6341 | 6356 |
6342 } // namespace content | 6357 } // namespace content |
OLD | NEW |