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

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

Issue 1397323004: Disable support for swapped out RenderFrame(Host) and add instrumentation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « content/common/site_isolation_policy.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/dump_without_crashing.h"
10 #include "base/logging.h" 11 #include "base/logging.h"
11 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/singleton.h" 13 #include "base/memory/singleton.h"
13 #include "base/message_loop/message_loop.h" 14 #include "base/message_loop/message_loop.h"
14 #include "base/metrics/histogram.h" 15 #include "base/metrics/histogram.h"
15 #include "base/stl_util.h" 16 #include "base/stl_util.h"
16 #include "base/strings/utf_string_conversions.h" 17 #include "base/strings/utf_string_conversions.h"
17 #include "base/sys_info.h" 18 #include "base/sys_info.h"
18 #include "base/trace_event/trace_event.h" 19 #include "base/trace_event/trace_event.h"
19 #include "base/trace_event/trace_event_synthetic_delay.h" 20 #include "base/trace_event/trace_event_synthetic_delay.h"
(...skipping 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after
1285 webwidget_->setCursorVisibilityState(is_visible); 1286 webwidget_->setCursorVisibilityState(is_visible);
1286 } 1287 }
1287 1288
1288 void RenderWidget::OnMouseCaptureLost() { 1289 void RenderWidget::OnMouseCaptureLost() {
1289 if (webwidget_) 1290 if (webwidget_)
1290 webwidget_->mouseCaptureLost(); 1291 webwidget_->mouseCaptureLost();
1291 } 1292 }
1292 1293
1293 void RenderWidget::OnSetFocus(bool enable) { 1294 void RenderWidget::OnSetFocus(bool enable) {
1294 has_focus_ = enable; 1295 has_focus_ = enable;
1296
1297 // TODO(nasko): This code is here to help diagnose https://crbug.com/541578.
1298 if (webwidget_->isWebView()) {
1299 blink::WebView* view = static_cast<blink::WebView*>(webwidget_);
1300 if (view->mainFrame()->isWebRemoteFrame()) {
1301 blink::WebFrame* mainFrame = view->mainFrame();
1302
1303 base::debug::Alias(&mainFrame);
1304 base::debug::Alias(&is_swapped_out_);
1305
1306 base::debug::DumpWithoutCrashing();
1307 }
1308 }
1309
1295 if (webwidget_) 1310 if (webwidget_)
1296 webwidget_->setFocus(enable); 1311 webwidget_->setFocus(enable);
1297 } 1312 }
1298 1313
1299 void RenderWidget::FlushPendingInputEventAck() { 1314 void RenderWidget::FlushPendingInputEventAck() {
1300 if (pending_input_event_ack_) { 1315 if (pending_input_event_ack_) {
1301 TRACE_EVENT_ASYNC_END0("input", "RenderWidget::ThrottledInputEventAck", 1316 TRACE_EVENT_ASYNC_END0("input", "RenderWidget::ThrottledInputEventAck",
1302 pending_input_event_ack_.get()); 1317 pending_input_event_ack_.get());
1303 Send(pending_input_event_ack_.release()); 1318 Send(pending_input_event_ack_.release());
1304 } 1319 }
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after
2379 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { 2394 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) {
2380 video_hole_frames_.AddObserver(frame); 2395 video_hole_frames_.AddObserver(frame);
2381 } 2396 }
2382 2397
2383 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { 2398 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) {
2384 video_hole_frames_.RemoveObserver(frame); 2399 video_hole_frames_.RemoveObserver(frame);
2385 } 2400 }
2386 #endif // defined(VIDEO_HOLE) 2401 #endif // defined(VIDEO_HOLE)
2387 2402
2388 } // namespace content 2403 } // namespace content
OLDNEW
« no previous file with comments | « content/common/site_isolation_policy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698