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

Side by Side Diff: cc/trees/layer_tree_host_unittest_context.cc

Issue 14696007: Warn on missing OVERRIDE/virtual everywhere, not just in header files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: new regressions, attempt 3 Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "cc/trees/layer_tree_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "cc/base/thread_impl.h" 8 #include "cc/base/thread_impl.h"
9 #include "cc/layers/content_layer.h" 9 #include "cc/layers/content_layer.h"
10 #include "cc/layers/heads_up_display_layer.h" 10 #include "cc/layers/heads_up_display_layer.h"
(...skipping 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after
1367 1367
1368 // Not reusing LayerTreeTest because it expects creating LTH to always succeed. 1368 // Not reusing LayerTreeTest because it expects creating LTH to always succeed.
1369 class LayerTreeHostTestCannotCreateIfCannotCreateOutputSurface 1369 class LayerTreeHostTestCannotCreateIfCannotCreateOutputSurface
1370 : public testing::Test, 1370 : public testing::Test,
1371 public FakeLayerTreeHostClient { 1371 public FakeLayerTreeHostClient {
1372 public: 1372 public:
1373 LayerTreeHostTestCannotCreateIfCannotCreateOutputSurface() 1373 LayerTreeHostTestCannotCreateIfCannotCreateOutputSurface()
1374 : FakeLayerTreeHostClient(FakeLayerTreeHostClient::DIRECT_3D) {} 1374 : FakeLayerTreeHostClient(FakeLayerTreeHostClient::DIRECT_3D) {}
1375 1375
1376 // FakeLayerTreeHostClient 1376 // FakeLayerTreeHostClient
1377 virtual scoped_ptr<OutputSurface> CreateOutputSurface() { 1377 virtual scoped_ptr<OutputSurface> CreateOutputSurface() OVERRIDE {
1378 return scoped_ptr<OutputSurface>(); 1378 return scoped_ptr<OutputSurface>();
1379 } 1379 }
1380 1380
1381 void RunTest(bool threaded) { 1381 void RunTest(bool threaded) {
1382 scoped_ptr<base::Thread> impl_thread; 1382 scoped_ptr<base::Thread> impl_thread;
1383 scoped_ptr<cc::Thread> impl_ccthread(NULL); 1383 scoped_ptr<cc::Thread> impl_ccthread(NULL);
1384 if (threaded) { 1384 if (threaded) {
1385 impl_thread.reset(new base::Thread("LayerTreeTest")); 1385 impl_thread.reset(new base::Thread("LayerTreeTest"));
1386 impl_ccthread = cc::ThreadImpl::CreateForDifferentThread( 1386 impl_ccthread = cc::ThreadImpl::CreateForDifferentThread(
1387 impl_thread->message_loop_proxy()); 1387 impl_thread->message_loop_proxy());
1388 ASSERT_TRUE(impl_ccthread); 1388 ASSERT_TRUE(impl_ccthread);
1389 } 1389 }
1390 1390
1391 LayerTreeSettings settings; 1391 LayerTreeSettings settings;
1392 scoped_ptr<LayerTreeHost> layer_tree_host = 1392 scoped_ptr<LayerTreeHost> layer_tree_host =
1393 LayerTreeHost::Create(this, settings, impl_ccthread.Pass()); 1393 LayerTreeHost::Create(this, settings, impl_ccthread.Pass());
1394 EXPECT_FALSE(layer_tree_host); 1394 EXPECT_FALSE(layer_tree_host);
1395 } 1395 }
1396 }; 1396 };
1397 1397
1398 SINGLE_AND_MULTI_THREAD_TEST_F( 1398 SINGLE_AND_MULTI_THREAD_TEST_F(
1399 LayerTreeHostTestCannotCreateIfCannotCreateOutputSurface); 1399 LayerTreeHostTestCannotCreateIfCannotCreateOutputSurface);
1400 1400
1401 } // namespace 1401 } // namespace
1402 } // namespace cc 1402 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest_animation.cc ('k') | chrome/browser/chrome_security_exploit_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698