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

Side by Side Diff: cc/debug/fake_context_provider.h

Issue 21026005: aura: Remove CreateOffscreenContext from ui::ContextFactory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: offscreencontext: clang-format Created 7 years, 4 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 | « cc/cc_tests.gyp ('k') | cc/debug/fake_context_provider.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CC_TEST_FAKE_CONTEXT_PROVIDER_H_ 5 #ifndef CC_DEBUG_FAKE_CONTEXT_PROVIDER_H_
6 #define CC_TEST_FAKE_CONTEXT_PROVIDER_H_ 6 #define CC_DEBUG_FAKE_CONTEXT_PROVIDER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
11 #include "base/threading/thread_checker.h" 11 #include "base/threading/thread_checker.h"
12 #include "cc/base/cc_export.h"
12 #include "cc/output/context_provider.h" 13 #include "cc/output/context_provider.h"
13 14
15 namespace WebKit { class WebGraphicsContext3D; }
16
14 namespace cc { 17 namespace cc {
15 class TestWebGraphicsContext3D;
16 18
17 class FakeContextProvider : public cc::ContextProvider { 19 class CC_EXPORT FakeContextProvider
20 : public NON_EXPORTED_BASE(cc::ContextProvider) {
18 public: 21 public:
19 typedef base::Callback<scoped_ptr<TestWebGraphicsContext3D>(void)> 22 typedef base::Callback<scoped_ptr<WebKit::WebGraphicsContext3D>(void)>
20 CreateCallback; 23 CreateCallback;
21 24
22 static scoped_refptr<FakeContextProvider> Create() { 25 static scoped_refptr<FakeContextProvider> Create() {
23 return Create(CreateCallback()); 26 return Create(CreateCallback());
24 } 27 }
25 28
26 static scoped_refptr<FakeContextProvider> Create( 29 static scoped_refptr<FakeContextProvider> Create(
27 const CreateCallback& create_callback) { 30 const CreateCallback& create_callback) {
28 scoped_refptr<FakeContextProvider> provider = new FakeContextProvider; 31 scoped_refptr<FakeContextProvider> provider = new FakeContextProvider;
29 if (!provider->InitializeOnMainThread(create_callback)) 32 if (!provider->InitializeOnMainThread(create_callback))
(...skipping 19 matching lines...) Expand all
49 52
50 base::ThreadChecker main_thread_checker_; 53 base::ThreadChecker main_thread_checker_;
51 base::ThreadChecker context_thread_checker_; 54 base::ThreadChecker context_thread_checker_;
52 55
53 base::Lock destroyed_lock_; 56 base::Lock destroyed_lock_;
54 bool destroyed_; 57 bool destroyed_;
55 }; 58 };
56 59
57 } // namespace cc 60 } // namespace cc
58 61
59 #endif // CC_TEST_FAKE_CONTEXT_PROVIDER_H_ 62 #endif // CC_DEBUG_FAKE_CONTEXT_PROVIDER_H_
60 63
OLDNEW
« no previous file with comments | « cc/cc_tests.gyp ('k') | cc/debug/fake_context_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698