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

Unified Diff: content/renderer/render_widget.cc

Issue 1962923002: Fix rendering of flash content inside an out-of-process iframe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removing unneded includes Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/render_widget.h ('k') | content/renderer/render_widget_owner_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index fb309d7b86e37e32daf668e308166df76f4c2284..7b2b77664b9be4dabd5708bdf3cf6aa53a0dc77d 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -81,6 +81,7 @@
#include "third_party/WebKit/public/web/WebRange.h"
#include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
#include "third_party/WebKit/public/web/WebView.h"
+#include "third_party/WebKit/public/web/WebWidget.h"
#include "third_party/skia/include/core/SkShader.h"
#include "ui/base/ui_base_switches.h"
#include "ui/gfx/geometry/point_conversions.h"
@@ -107,8 +108,6 @@
#include "content/renderer/mus/render_widget_mus_connection.h"
#endif
-#include "third_party/WebKit/public/web/WebWidget.h"
-
using blink::WebCompositionUnderline;
using blink::WebCursorInfo;
using blink::WebDeviceEmulationParams;
@@ -247,7 +246,8 @@ RenderWidget::RenderWidget(CompositorDependencies* compositor_deps,
popup_origin_scale_for_emulation_(0.f),
frame_swap_message_queue_(new FrameSwapMessageQueue()),
resizing_mode_selector_(new ResizingModeSelector()),
- has_host_context_menu_location_(false) {
+ has_host_context_menu_location_(false),
+ has_focus_(false) {
if (!swapped_out)
RenderProcess::current()->AddRefProcess();
DCHECK(RenderThread::Get());
@@ -671,8 +671,13 @@ void RenderWidget::OnMouseCaptureLost() {
}
void RenderWidget::OnSetFocus(bool enable) {
+ has_focus_ = enable;
+
if (webwidget_)
webwidget_->setFocus(enable);
+
+ FOR_EACH_OBSERVER(RenderFrameImpl, render_frames_,
+ RenderWidgetSetFocus(enable));
}
///////////////////////////////////////////////////////////////////////////////
@@ -819,6 +824,10 @@ void RenderWidget::DidCommitAndDrawCompositorFrame() {
// NOTE: Tests may break if this event is renamed or moved. See
// tab_capture_performancetest.cc.
TRACE_EVENT0("gpu", "RenderWidget::DidCommitAndDrawCompositorFrame");
+
+ FOR_EACH_OBSERVER(RenderFrameImpl, render_frames_,
+ DidCommitAndDrawCompositorFrame());
+
// Notify subclasses that we initiated the paint operation.
DidInitiatePaint();
}
@@ -1064,6 +1073,9 @@ bool RenderWidget::WillHandleGestureEvent(const blink::WebGestureEvent& event) {
}
bool RenderWidget::WillHandleMouseEvent(const blink::WebMouseEvent& event) {
+ FOR_EACH_OBSERVER(RenderFrameImpl, render_frames_,
+ RenderWidgetWillHandleMouseEvent());
+
if (owner_delegate_)
return owner_delegate_->RenderWidgetWillHandleMouseEvent(event);
@@ -1693,11 +1705,6 @@ bool RenderWidget::SetDeviceColorProfile(
void RenderWidget::OnOrientationChange() {
}
-void RenderWidget::DidInitiatePaint() {
- if (owner_delegate_)
- owner_delegate_->RenderWidgetDidCommitAndDrawCompositorFrame();
-}
-
void RenderWidget::DidFlushPaint() {
if (owner_delegate_)
owner_delegate_->RenderWidgetDidFlushPaint();
« no previous file with comments | « content/renderer/render_widget.h ('k') | content/renderer/render_widget_owner_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698