| Index: content/renderer/render_view_impl.cc
|
| diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
|
| index 5e60a12b4b3f443279a911af73f065e91bf746ee..277667b0dd16a0cf2de005bf00f49f56c5445717 100644
|
| --- a/content/renderer/render_view_impl.cc
|
| +++ b/content/renderer/render_view_impl.cc
|
| @@ -639,10 +639,6 @@ RenderViewImpl::RenderViewImpl(CompositorDependencies* compositor_deps,
|
| #if defined(OS_ANDROID)
|
| expected_content_intent_id_(0),
|
| #endif
|
| -#if defined(ENABLE_PLUGINS)
|
| - focused_pepper_plugin_(NULL),
|
| - pepper_last_mouse_event_target_(NULL),
|
| -#endif
|
| enumeration_completion_id_(0),
|
| session_storage_namespace_id_(params.session_storage_namespace_id) {
|
| GetWidget()->set_owner_delegate(this);
|
| @@ -1157,40 +1153,6 @@ blink::WebView* RenderViewImpl::webview() const {
|
| }
|
|
|
| #if defined(ENABLE_PLUGINS)
|
| -void RenderViewImpl::PepperInstanceCreated(
|
| - PepperPluginInstanceImpl* instance) {
|
| - active_pepper_instances_.insert(instance);
|
| -
|
| - RenderFrameImpl* const render_frame = instance->render_frame();
|
| - render_frame->Send(
|
| - new FrameHostMsg_PepperInstanceCreated(render_frame->GetRoutingID()));
|
| -}
|
| -
|
| -void RenderViewImpl::PepperInstanceDeleted(
|
| - PepperPluginInstanceImpl* instance) {
|
| - active_pepper_instances_.erase(instance);
|
| -
|
| - if (pepper_last_mouse_event_target_ == instance)
|
| - pepper_last_mouse_event_target_ = NULL;
|
| - if (focused_pepper_plugin_ == instance)
|
| - PepperFocusChanged(instance, false);
|
| -
|
| - RenderFrameImpl* const render_frame = instance->render_frame();
|
| - if (render_frame)
|
| - render_frame->Send(
|
| - new FrameHostMsg_PepperInstanceDeleted(render_frame->GetRoutingID()));
|
| -}
|
| -
|
| -void RenderViewImpl::PepperFocusChanged(PepperPluginInstanceImpl* instance,
|
| - bool focused) {
|
| - if (focused)
|
| - focused_pepper_plugin_ = instance;
|
| - else if (focused_pepper_plugin_ == instance)
|
| - focused_pepper_plugin_ = NULL;
|
| -
|
| - UpdateTextInputState(ShowIme::HIDE_IME, ChangeSource::FROM_NON_IME);
|
| - UpdateSelectionBounds();
|
| -}
|
|
|
| #if defined(OS_MACOSX)
|
| void RenderViewImpl::OnGetRenderedText() {
|
| @@ -1258,17 +1220,6 @@ bool RenderViewImpl::RenderWidgetWillHandleMouseEvent(
|
| possible_drag_event_info_.event_location =
|
| gfx::Point(event.globalX, event.globalY);
|
|
|
| -#if defined(ENABLE_PLUGINS)
|
| - // This method is called for every mouse event that the render view receives.
|
| - // And then the mouse event is forwarded to WebKit, which dispatches it to the
|
| - // event target. Potentially a Pepper plugin will receive the event.
|
| - // In order to tell whether a plugin gets the last mouse event and which it
|
| - // is, we set |pepper_last_mouse_event_target_| to NULL here. If a plugin gets
|
| - // the event, it will notify us via DidReceiveMouseEvent() and set itself as
|
| - // |pepper_last_mouse_event_target_|.
|
| - pepper_last_mouse_event_target_ = NULL;
|
| -#endif
|
| -
|
| // If the mouse is locked, only the current owner of the mouse lock can
|
| // process mouse events.
|
| return mouse_lock_dispatcher_->WillHandleMouseEvent(event);
|
| @@ -2072,7 +2023,8 @@ void RenderViewImpl::initializeLayerTreeView() {
|
| render_thread ? render_thread->input_handler_manager() : NULL;
|
| if (input_handler_manager) {
|
| input_handler_manager->AddInputHandler(
|
| - GetRoutingID(), rwc->GetInputHandler(), AsWeakPtr(),
|
| + GetRoutingID(), rwc->GetInputHandler(),
|
| + base::SupportsWeakPtr<RenderViewImpl>::AsWeakPtr(),
|
| webkit_preferences_.enable_scroll_animator,
|
| UseGestureBasedWheelScrolling());
|
| }
|
| @@ -2728,19 +2680,6 @@ void RenderViewImpl::OnResize(const ResizeParams& params) {
|
| has_scrolled_focused_editable_node_into_rect_ = false;
|
| }
|
|
|
| -void RenderViewImpl::RenderWidgetDidCommitAndDrawCompositorFrame() {
|
| -#if defined(ENABLE_PLUGINS)
|
| - // Notify all instances that we painted. The same caveats apply as for
|
| - // ViewFlushedPaint regarding instances closing themselves, so we take
|
| - // similar precautions.
|
| - PepperPluginSet plugins = active_pepper_instances_;
|
| - for (PepperPluginSet::iterator i = plugins.begin(); i != plugins.end(); ++i) {
|
| - if (active_pepper_instances_.find(*i) != active_pepper_instances_.end())
|
| - (*i)->ViewInitiatedPaint();
|
| - }
|
| -#endif
|
| -}
|
| -
|
| void RenderViewImpl::RenderWidgetDidFlushPaint() {
|
| // If the RenderWidget is closing down then early-exit, otherwise we'll crash.
|
| // See crbug.com/112921.
|
| @@ -2833,12 +2772,6 @@ void RenderViewImpl::OnWasHidden() {
|
|
|
| if (webview())
|
| webview()->setVisibilityState(visibilityState(), false);
|
| -
|
| -#if defined(ENABLE_PLUGINS)
|
| - for (PepperPluginSet::iterator i = active_pepper_instances_.begin();
|
| - i != active_pepper_instances_.end(); ++i)
|
| - (*i)->PageVisibilityChanged(false);
|
| -#endif // ENABLE_PLUGINS
|
| }
|
|
|
| void RenderViewImpl::OnWasShown(bool needs_repainting,
|
| @@ -2852,12 +2785,6 @@ void RenderViewImpl::OnWasShown(bool needs_repainting,
|
|
|
| if (webview())
|
| webview()->setVisibilityState(visibilityState(), false);
|
| -
|
| -#if defined(ENABLE_PLUGINS)
|
| - for (PepperPluginSet::iterator i = active_pepper_instances_.begin();
|
| - i != active_pepper_instances_.end(); ++i)
|
| - (*i)->PageVisibilityChanged(true);
|
| -#endif // ENABLE_PLUGINS
|
| }
|
|
|
| GURL RenderViewImpl::GetURLForGraphicsContext3D() {
|
| @@ -2879,12 +2806,6 @@ void RenderViewImpl::SetFocus(bool enable) {
|
| has_focus_ = enable;
|
| RenderWidget::OnSetFocus(enable);
|
|
|
| -#if defined(ENABLE_PLUGINS)
|
| - // Notify all Pepper plugins.
|
| - for (PepperPluginSet::iterator i = active_pepper_instances_.begin();
|
| - i != active_pepper_instances_.end(); ++i)
|
| - (*i)->SetContentAreaFocus(enable);
|
| -#endif
|
| // Notify all BrowserPlugins of the RenderView's focus state.
|
| if (BrowserPluginManager::Get())
|
| BrowserPluginManager::Get()->UpdateFocusState();
|
| @@ -3189,9 +3110,9 @@ void RenderViewImpl::scheduleContentIntent(const WebURL& intent,
|
| bool is_main_frame) {
|
| // Introduce a short delay so that the user can notice the content.
|
| base::MessageLoop::current()->PostDelayedTask(
|
| - FROM_HERE,
|
| - base::Bind(&RenderViewImpl::LaunchAndroidContentIntent, AsWeakPtr(),
|
| - intent, expected_content_intent_id_, is_main_frame),
|
| + FROM_HERE, base::Bind(&RenderViewImpl::LaunchAndroidContentIntent,
|
| + base::SupportsWeakPtr<RenderViewImpl>::AsWeakPtr(),
|
| + intent, expected_content_intent_id_, is_main_frame),
|
| base::TimeDelta::FromMilliseconds(kContentIntentDelayMilliseconds));
|
| }
|
|
|
|
|