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

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

Issue 2278283002: Implement Mac Pop-up Dictionary for OOPIF. (Closed)
Patch Set: Added Tests and Modified DEPS Created 4 years, 3 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 "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
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 6168 matching lines...) Expand 10 before | Expand all | Expand 10 after
6309 } 6310 }
6310 6311
6311 void RenderFrameImpl::OnSetPepperVolume(int32_t pp_instance, double volume) { 6312 void RenderFrameImpl::OnSetPepperVolume(int32_t pp_instance, double volume) {
6312 PepperPluginInstanceImpl* instance = static_cast<PepperPluginInstanceImpl*>( 6313 PepperPluginInstanceImpl* instance = static_cast<PepperPluginInstanceImpl*>(
6313 PepperPluginInstance::Get(pp_instance)); 6314 PepperPluginInstance::Get(pp_instance));
6314 if (instance) 6315 if (instance)
6315 instance->audio_controller().SetVolume(volume); 6316 instance->audio_controller().SetVolume(volume);
6316 } 6317 }
6317 #endif // ENABLE_PLUGINS 6318 #endif // ENABLE_PLUGINS
6318 6319
6320 #if defined(OS_MACOSX)
6321 void RenderFrameImpl::OnTextInputClientMessageReceived(
6322 RenderWidget* render_widget,
6323 const IPC::Message& message) {
6324 if (render_widget_ == render_widget) {
6325 if (!text_input_client_observer_ ||
6326 text_input_client_observer_->render_widget() != render_widget) {
6327 text_input_client_observer_.reset(
6328 new TextInputClientObserver(render_widget_, render_view_->webview()));
6329 }
6330 text_input_client_observer_->OnMessageReceived(message);
6331 }
6332 }
6333 #endif
6334
6319 void RenderFrameImpl::RenderWidgetSetFocus(bool enable) { 6335 void RenderFrameImpl::RenderWidgetSetFocus(bool enable) {
6320 #if defined(ENABLE_PLUGINS) 6336 #if defined(ENABLE_PLUGINS)
6321 // Notify all Pepper plugins. 6337 // Notify all Pepper plugins.
6322 for (auto* plugin : active_pepper_instances_) 6338 for (auto* plugin : active_pepper_instances_)
6323 plugin->SetContentAreaFocus(enable); 6339 plugin->SetContentAreaFocus(enable);
6324 #endif 6340 #endif
6325 } 6341 }
6326 6342
6327 void RenderFrameImpl::RenderWidgetWillHandleMouseEvent() { 6343 void RenderFrameImpl::RenderWidgetWillHandleMouseEvent() {
6328 #if defined(ENABLE_PLUGINS) 6344 #if defined(ENABLE_PLUGINS)
6329 // This method is called for every mouse event that the RenderWidget receives. 6345 // This method is called for every mouse event that the RenderWidget receives.
6330 // And then the mouse event is forwarded to blink, which dispatches it to the 6346 // And then the mouse event is forwarded to blink, which dispatches it to the
6331 // event target. Potentially a Pepper plugin will receive the event. 6347 // event target. Potentially a Pepper plugin will receive the event.
6332 // In order to tell whether a plugin gets the last mouse event and which it 6348 // In order to tell whether a plugin gets the last mouse event and which it
6333 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6349 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6334 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6350 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6335 // |pepper_last_mouse_event_target_|. 6351 // |pepper_last_mouse_event_target_|.
6336 pepper_last_mouse_event_target_ = nullptr; 6352 pepper_last_mouse_event_target_ = nullptr;
6337 #endif 6353 #endif
6338 } 6354 }
6339 6355
6340 } // namespace content 6356 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698