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

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

Issue 2278283002: Implement Mac Pop-up Dictionary for OOPIF. (Closed)
Patch Set: Rebased 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 "crypto/sha2.h" 135 #include "crypto/sha2.h"
135 #include "gin/modules/module_registry.h" 136 #include "gin/modules/module_registry.h"
136 #include "media/audio/audio_output_device.h" 137 #include "media/audio/audio_output_device.h"
137 #include "media/base/audio_renderer_mixer_input.h" 138 #include "media/base/audio_renderer_mixer_input.h"
138 #include "media/base/cdm_factory.h" 139 #include "media/base/cdm_factory.h"
139 #include "media/base/decoder_factory.h" 140 #include "media/base/decoder_factory.h"
140 #include "media/base/media.h" 141 #include "media/base/media.h"
(...skipping 6187 matching lines...) Expand 10 before | Expand all | Expand 10 after
6328 } 6329 }
6329 6330
6330 void RenderFrameImpl::OnSetPepperVolume(int32_t pp_instance, double volume) { 6331 void RenderFrameImpl::OnSetPepperVolume(int32_t pp_instance, double volume) {
6331 PepperPluginInstanceImpl* instance = static_cast<PepperPluginInstanceImpl*>( 6332 PepperPluginInstanceImpl* instance = static_cast<PepperPluginInstanceImpl*>(
6332 PepperPluginInstance::Get(pp_instance)); 6333 PepperPluginInstance::Get(pp_instance));
6333 if (instance) 6334 if (instance)
6334 instance->audio_controller().SetVolume(volume); 6335 instance->audio_controller().SetVolume(volume);
6335 } 6336 }
6336 #endif // ENABLE_PLUGINS 6337 #endif // ENABLE_PLUGINS
6337 6338
6339 #if defined(OS_MACOSX)
6340 void RenderFrameImpl::OnTextInputClientMessageReceived(
6341 RenderWidget* render_widget,
6342 const IPC::Message& message) {
6343 // Only the local root owning the widget should handle these messages.
6344 if (render_widget_ == render_widget) {
6345 if (!text_input_client_observer_) {
6346 text_input_client_observer_.reset(new TextInputClientObserver(this));
6347 }
6348 text_input_client_observer_->OnMessageReceived(message);
6349 }
6350 }
6351 #endif
6352
6338 void RenderFrameImpl::RenderWidgetSetFocus(bool enable) { 6353 void RenderFrameImpl::RenderWidgetSetFocus(bool enable) {
6339 #if defined(ENABLE_PLUGINS) 6354 #if defined(ENABLE_PLUGINS)
6340 // Notify all Pepper plugins. 6355 // Notify all Pepper plugins.
6341 for (auto* plugin : active_pepper_instances_) 6356 for (auto* plugin : active_pepper_instances_)
6342 plugin->SetContentAreaFocus(enable); 6357 plugin->SetContentAreaFocus(enable);
6343 #endif 6358 #endif
6344 } 6359 }
6345 6360
6346 void RenderFrameImpl::RenderWidgetWillHandleMouseEvent() { 6361 void RenderFrameImpl::RenderWidgetWillHandleMouseEvent() {
6347 #if defined(ENABLE_PLUGINS) 6362 #if defined(ENABLE_PLUGINS)
6348 // This method is called for every mouse event that the RenderWidget receives. 6363 // This method is called for every mouse event that the RenderWidget receives.
6349 // And then the mouse event is forwarded to blink, which dispatches it to the 6364 // And then the mouse event is forwarded to blink, which dispatches it to the
6350 // event target. Potentially a Pepper plugin will receive the event. 6365 // event target. Potentially a Pepper plugin will receive the event.
6351 // In order to tell whether a plugin gets the last mouse event and which it 6366 // In order to tell whether a plugin gets the last mouse event and which it
6352 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6367 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6353 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6368 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6354 // |pepper_last_mouse_event_target_|. 6369 // |pepper_last_mouse_event_target_|.
6355 pepper_last_mouse_event_target_ = nullptr; 6370 pepper_last_mouse_event_target_ = nullptr;
6356 #endif 6371 #endif
6357 } 6372 }
6358 6373
6359 } // namespace content 6374 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698