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

Side by Side Diff: content/browser/media/capture/web_contents_video_capture_device_unittest.cc

Issue 1312843012: Use DCHECK_CURRENTLY_ON in content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert bad search/replace Created 5 years, 3 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 | « no previous file | content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.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/media/capture/web_contents_video_capture_device.h" 5 #include "content/browser/media/capture/web_contents_video_capture_device.h"
6 6
7 #include "base/bind_helpers.h" 7 #include "base/bind_helpers.h"
8 #include "base/debug/debugger.h" 8 #include "base/debug/debugger.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/test/test_timeouts.h" 10 #include "base/test/test_timeouts.h"
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 } else { 664 } else {
665 // Simulate a non-accelerated paint. 665 // Simulate a non-accelerated paint.
666 NotificationService::current()->Notify( 666 NotificationService::current()->Notify(
667 NOTIFICATION_RENDER_WIDGET_HOST_DID_UPDATE_BACKING_STORE, 667 NOTIFICATION_RENDER_WIDGET_HOST_DID_UPDATE_BACKING_STORE,
668 Source<RenderWidgetHost>(web_contents_->GetRenderViewHost()), 668 Source<RenderWidgetHost>(web_contents_->GetRenderViewHost()),
669 NotificationService::NoDetails()); 669 NotificationService::NoDetails());
670 } 670 }
671 } 671 }
672 672
673 void SimulateSourceSizeChange(const gfx::Size& size) { 673 void SimulateSourceSizeChange(const gfx::Size& size) {
674 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 674 DCHECK_CURRENTLY_ON(BrowserThread::UI);
675 CaptureTestView* test_view = static_cast<CaptureTestView*>( 675 CaptureTestView* test_view = static_cast<CaptureTestView*>(
676 web_contents_->GetRenderViewHost()->GetView()); 676 web_contents_->GetRenderViewHost()->GetView());
677 test_view->SetSize(size); 677 test_view->SetSize(size);
678 // Normally, RenderWidgetHostImpl would notify WebContentsImpl that the size 678 // Normally, RenderWidgetHostImpl would notify WebContentsImpl that the size
679 // has changed. However, in this test setup where there is no render 679 // has changed. However, in this test setup where there is no render
680 // process, we must notify WebContentsImpl directly. 680 // process, we must notify WebContentsImpl directly.
681 WebContentsImpl* const as_web_contents_impl = 681 WebContentsImpl* const as_web_contents_impl =
682 static_cast<WebContentsImpl*>(web_contents_.get()); 682 static_cast<WebContentsImpl*>(web_contents_.get());
683 RenderWidgetHostDelegate* const as_rwh_delegate = 683 RenderWidgetHostDelegate* const as_rwh_delegate =
684 static_cast<RenderWidgetHostDelegate*>(as_web_contents_impl); 684 static_cast<RenderWidgetHostDelegate*>(as_web_contents_impl);
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
1135 policies[i], gfx::Size(1000, 1000), gfx::Size(1000, 1000)); 1135 policies[i], gfx::Size(1000, 1000), gfx::Size(1000, 1000));
1136 RunTestForPreferredSize( 1136 RunTestForPreferredSize(
1137 policies[i], gfx::Size(1600, 1000), gfx::Size(1600, 1000)); 1137 policies[i], gfx::Size(1600, 1000), gfx::Size(1600, 1000));
1138 RunTestForPreferredSize( 1138 RunTestForPreferredSize(
1139 policies[i], gfx::Size(837, 999), gfx::Size(837, 999)); 1139 policies[i], gfx::Size(837, 999), gfx::Size(837, 999));
1140 } 1140 }
1141 } 1141 }
1142 1142
1143 } // namespace 1143 } // namespace
1144 } // namespace content 1144 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698