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

Side by Side Diff: trunk/src/content/renderer/render_view_impl.cc

Issue 343033002: Revert 278472 "DevTools: Fix for Page.captureScreenshot" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « trunk/src/content/renderer/render_view_impl.h ('k') | trunk/src/ui/events/latency_info.h » ('j') | 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_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 // TODO(viettrungluu): Move to a separate message filter. 1110 // TODO(viettrungluu): Move to a separate message filter.
1111 IPC_MESSAGE_HANDLER(ViewMsg_SetHistoryLengthAndPrune, 1111 IPC_MESSAGE_HANDLER(ViewMsg_SetHistoryLengthAndPrune,
1112 OnSetHistoryLengthAndPrune) 1112 OnSetHistoryLengthAndPrune)
1113 IPC_MESSAGE_HANDLER(ViewMsg_EnableViewSourceMode, OnEnableViewSourceMode) 1113 IPC_MESSAGE_HANDLER(ViewMsg_EnableViewSourceMode, OnEnableViewSourceMode)
1114 IPC_MESSAGE_HANDLER(ViewMsg_SetAccessibilityMode, OnSetAccessibilityMode) 1114 IPC_MESSAGE_HANDLER(ViewMsg_SetAccessibilityMode, OnSetAccessibilityMode)
1115 IPC_MESSAGE_HANDLER(ViewMsg_DisownOpener, OnDisownOpener) 1115 IPC_MESSAGE_HANDLER(ViewMsg_DisownOpener, OnDisownOpener)
1116 IPC_MESSAGE_HANDLER(ViewMsg_ReleaseDisambiguationPopupBitmap, 1116 IPC_MESSAGE_HANDLER(ViewMsg_ReleaseDisambiguationPopupBitmap,
1117 OnReleaseDisambiguationPopupBitmap) 1117 OnReleaseDisambiguationPopupBitmap)
1118 IPC_MESSAGE_HANDLER(ViewMsg_WindowSnapshotCompleted, 1118 IPC_MESSAGE_HANDLER(ViewMsg_WindowSnapshotCompleted,
1119 OnWindowSnapshotCompleted) 1119 OnWindowSnapshotCompleted)
1120 IPC_MESSAGE_HANDLER(ViewMsg_ForceRedraw, OnForceRedraw)
1121 IPC_MESSAGE_HANDLER(ViewMsg_SelectWordAroundCaret, OnSelectWordAroundCaret) 1120 IPC_MESSAGE_HANDLER(ViewMsg_SelectWordAroundCaret, OnSelectWordAroundCaret)
1122 #if defined(OS_ANDROID) 1121 #if defined(OS_ANDROID)
1123 IPC_MESSAGE_HANDLER(InputMsg_ActivateNearestFindResult, 1122 IPC_MESSAGE_HANDLER(InputMsg_ActivateNearestFindResult,
1124 OnActivateNearestFindResult) 1123 OnActivateNearestFindResult)
1125 IPC_MESSAGE_HANDLER(ViewMsg_FindMatchRects, OnFindMatchRects) 1124 IPC_MESSAGE_HANDLER(ViewMsg_FindMatchRects, OnFindMatchRects)
1126 IPC_MESSAGE_HANDLER(ViewMsg_SelectPopupMenuItems, OnSelectPopupMenuItems) 1125 IPC_MESSAGE_HANDLER(ViewMsg_SelectPopupMenuItems, OnSelectPopupMenuItems)
1127 IPC_MESSAGE_HANDLER(ViewMsg_UpdateTopControlsState, 1126 IPC_MESSAGE_HANDLER(ViewMsg_UpdateTopControlsState,
1128 OnUpdateTopControlsState) 1127 OnUpdateTopControlsState)
1129 IPC_MESSAGE_HANDLER(ViewMsg_ExtractSmartClipData, OnExtractSmartClipData) 1128 IPC_MESSAGE_HANDLER(ViewMsg_ExtractSmartClipData, OnExtractSmartClipData)
1130 #elif defined(OS_MACOSX) 1129 #elif defined(OS_MACOSX)
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
1327 RenderThreadImpl::current()->DoNotNotifyWebKitOfModalLoop(); 1326 RenderThreadImpl::current()->DoNotNotifyWebKitOfModalLoop();
1328 1327
1329 message->EnableMessagePumping(); // Runs a nested message loop. 1328 message->EnableMessagePumping(); // Runs a nested message loop.
1330 return Send(message); 1329 return Send(message);
1331 } 1330 }
1332 1331
1333 void RenderViewImpl::GetWindowSnapshot(const WindowSnapshotCallback& callback) { 1332 void RenderViewImpl::GetWindowSnapshot(const WindowSnapshotCallback& callback) {
1334 int id = next_snapshot_id_++; 1333 int id = next_snapshot_id_++;
1335 pending_snapshots_.insert(std::make_pair(id, callback)); 1334 pending_snapshots_.insert(std::make_pair(id, callback));
1336 ui::LatencyInfo latency_info; 1335 ui::LatencyInfo latency_info;
1337 latency_info.AddLatencyNumber(ui::WINDOW_OLD_SNAPSHOT_FRAME_NUMBER_COMPONENT,
1338 0,
1339 id);
1340 scoped_ptr<cc::SwapPromiseMonitor> latency_info_swap_promise_monitor;
1341 if (RenderWidgetCompositor* rwc = compositor()) {
1342 latency_info_swap_promise_monitor =
1343 rwc->CreateLatencyInfoSwapPromiseMonitor(&latency_info).Pass();
1344 }
1345 ScheduleCompositeWithForcedRedraw();
1346 }
1347
1348 void RenderViewImpl::OnForceRedraw(int id) {
1349 ui::LatencyInfo latency_info;
1350 latency_info.AddLatencyNumber(ui::WINDOW_SNAPSHOT_FRAME_NUMBER_COMPONENT, 1336 latency_info.AddLatencyNumber(ui::WINDOW_SNAPSHOT_FRAME_NUMBER_COMPONENT,
1351 0, 1337 0,
1352 id); 1338 id);
1353 scoped_ptr<cc::SwapPromiseMonitor> latency_info_swap_promise_monitor; 1339 scoped_ptr<cc::SwapPromiseMonitor> latency_info_swap_promise_monitor;
1354 if (RenderWidgetCompositor* rwc = compositor()) { 1340 if (RenderWidgetCompositor* rwc = compositor()) {
1355 latency_info_swap_promise_monitor = 1341 latency_info_swap_promise_monitor =
1356 rwc->CreateLatencyInfoSwapPromiseMonitor(&latency_info).Pass(); 1342 rwc->CreateLatencyInfoSwapPromiseMonitor(&latency_info).Pass();
1357 } 1343 }
1358 ScheduleCompositeWithForcedRedraw(); 1344 ScheduleCompositeWithForcedRedraw();
1359 } 1345 }
(...skipping 2653 matching lines...) Expand 10 before | Expand all | Expand 10 after
4013 std::vector<gfx::Size> sizes; 3999 std::vector<gfx::Size> sizes;
4014 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 4000 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
4015 if (!url.isEmpty()) 4001 if (!url.isEmpty())
4016 urls.push_back( 4002 urls.push_back(
4017 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 4003 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
4018 } 4004 }
4019 SendUpdateFaviconURL(urls); 4005 SendUpdateFaviconURL(urls);
4020 } 4006 }
4021 4007
4022 } // namespace content 4008 } // namespace content
OLDNEW
« no previous file with comments | « trunk/src/content/renderer/render_view_impl.h ('k') | trunk/src/ui/events/latency_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698