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

Unified Diff: cc/test/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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/texture_layer_unittest.cc ('k') | cc/test/fake_context_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/fake_context_provider.h
diff --git a/cc/test/fake_context_provider.h b/cc/test/fake_context_provider.h
deleted file mode 100644
index 4a18e4a8b0f78de63b2c6fd4e6572146bb8d3310..0000000000000000000000000000000000000000
--- a/cc/test/fake_context_provider.h
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CC_TEST_FAKE_CONTEXT_PROVIDER_H_
-#define CC_TEST_FAKE_CONTEXT_PROVIDER_H_
-
-#include "base/callback.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/synchronization/lock.h"
-#include "base/threading/thread_checker.h"
-#include "cc/output/context_provider.h"
-
-namespace cc {
-class TestWebGraphicsContext3D;
-
-class FakeContextProvider : public cc::ContextProvider {
- public:
- typedef base::Callback<scoped_ptr<TestWebGraphicsContext3D>(void)>
- CreateCallback;
-
- static scoped_refptr<FakeContextProvider> Create() {
- return Create(CreateCallback());
- }
-
- static scoped_refptr<FakeContextProvider> Create(
- const CreateCallback& create_callback) {
- scoped_refptr<FakeContextProvider> provider = new FakeContextProvider;
- if (!provider->InitializeOnMainThread(create_callback))
- return NULL;
- return provider;
- }
-
- virtual bool BindToCurrentThread() OVERRIDE;
- virtual WebKit::WebGraphicsContext3D* Context3d() OVERRIDE;
- virtual class GrContext* GrContext() OVERRIDE;
- virtual void VerifyContexts() OVERRIDE;
- virtual bool DestroyedOnMainThread() OVERRIDE;
- virtual void SetLostContextCallback(const LostContextCallback& cb) OVERRIDE;
-
- protected:
- FakeContextProvider();
- virtual ~FakeContextProvider();
-
- bool InitializeOnMainThread(const CreateCallback& create_callback);
-
- scoped_ptr<WebKit::WebGraphicsContext3D> context3d_;
- bool bound_;
-
- base::ThreadChecker main_thread_checker_;
- base::ThreadChecker context_thread_checker_;
-
- base::Lock destroyed_lock_;
- bool destroyed_;
-};
-
-} // namespace cc
-
-#endif // CC_TEST_FAKE_CONTEXT_PROVIDER_H_
-
« no previous file with comments | « cc/layers/texture_layer_unittest.cc ('k') | cc/test/fake_context_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698