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

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 141683005: Removes MessageLoop::Type checks in favor of IsCurrent on MessageLoops. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: base:: Created 6 years, 11 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 | « content/browser/browser_main_loop.cc ('k') | media/audio/audio_manager_base.cc » ('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/browser/renderer_host/render_widget_host_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 2432 matching lines...) Expand 10 before | Expand all | Expand 10 after
2443 Send(new ViewMsg_WindowSnapshotCompleted( 2443 Send(new ViewMsg_WindowSnapshotCompleted(
2444 routing_id, snapshot_id, gfx::Size(), png_vector)); 2444 routing_id, snapshot_id, gfx::Size(), png_vector));
2445 return; 2445 return;
2446 } 2446 }
2447 2447
2448 Send(new ViewMsg_WindowSnapshotCompleted( 2448 Send(new ViewMsg_WindowSnapshotCompleted(
2449 routing_id, snapshot_id, snapshot_size, png_data->data())); 2449 routing_id, snapshot_id, snapshot_size, png_data->data()));
2450 } 2450 }
2451 2451
2452 void RenderWidgetHostImpl::WindowSnapshotReachedScreen(int snapshot_id) { 2452 void RenderWidgetHostImpl::WindowSnapshotReachedScreen(int snapshot_id) {
2453 DCHECK(base::MessageLoop::current()->IsType(base::MessageLoop::TYPE_UI)); 2453 DCHECK(base::MessageLoopForUI::IsCurrent());
2454 2454
2455 std::vector<unsigned char> png; 2455 std::vector<unsigned char> png;
2456 2456
2457 // This feature is behind the kEnableGpuBenchmarking command line switch 2457 // This feature is behind the kEnableGpuBenchmarking command line switch
2458 // because it poses security concerns and should only be used for testing. 2458 // because it poses security concerns and should only be used for testing.
2459 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 2459 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
2460 if (!command_line.HasSwitch(switches::kEnableGpuBenchmarking)) { 2460 if (!command_line.HasSwitch(switches::kEnableGpuBenchmarking)) {
2461 Send(new ViewMsg_WindowSnapshotCompleted( 2461 Send(new ViewMsg_WindowSnapshotCompleted(
2462 GetRoutingID(), snapshot_id, gfx::Size(), png)); 2462 GetRoutingID(), snapshot_id, gfx::Size(), png));
2463 return; 2463 return;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
2506 } 2506 }
2507 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(rwh); 2507 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(rwh);
2508 if (rwhi_set.insert(rwhi).second) 2508 if (rwhi_set.insert(rwhi).second)
2509 rwhi->FrameSwapped(latency_info[i]); 2509 rwhi->FrameSwapped(latency_info[i]);
2510 } 2510 }
2511 } 2511 }
2512 } 2512 }
2513 } 2513 }
2514 2514
2515 } // namespace content 2515 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | media/audio/audio_manager_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698