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

Unified Diff: components/surfaces/surfaces_context_provider.h

Issue 1138293002: core_services: Add mojo:surfaces_service to core_services. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: components/surfaces/surfaces_context_provider.h
diff --git a/components/surfaces/context_provider_mojo.h b/components/surfaces/surfaces_context_provider.h
similarity index 68%
rename from components/surfaces/context_provider_mojo.h
rename to components/surfaces/surfaces_context_provider.h
index 2e1b7f13b8eeeae36c23524a22156799bf253ba8..fd5efef32f741c7cc30df5c03f571b04411b11ce 100644
--- a/components/surfaces/context_provider_mojo.h
+++ b/components/surfaces/surfaces_context_provider.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef COMPONENTS_SURFACES_CONTEXT_PROVIDER_MOJO_H_
-#define COMPONENTS_SURFACES_CONTEXT_PROVIDER_MOJO_H_
+#ifndef COMPONENTS_SURFACES_SURFACES_CONTEXT_PROVIDER_H_
+#define COMPONENTS_SURFACES_SURFACES_CONTEXT_PROVIDER_H_
#include "base/macros.h"
#include "base/synchronization/lock.h"
@@ -11,11 +11,12 @@
#include "third_party/mojo/src/mojo/public/c/gles2/gles2.h"
#include "third_party/mojo/src/mojo/public/cpp/system/core.h"
-namespace mojo {
+namespace surfaces {
-class ContextProviderMojo : public cc::ContextProvider {
+class SurfacesContextProvider : public cc::ContextProvider {
public:
- explicit ContextProviderMojo(ScopedMessagePipeHandle command_buffer_handle);
+ explicit SurfacesContextProvider(
+ mojo::ScopedMessagePipeHandle command_buffer_handle);
// cc::ContextProvider implementation.
bool BindToCurrentThread() override;
@@ -37,26 +38,26 @@ class ContextProviderMojo : public cc::ContextProvider {
base::Lock* GetLock() override;
protected:
- friend class base::RefCountedThreadSafe<ContextProviderMojo>;
- ~ContextProviderMojo() override;
+ friend class base::RefCountedThreadSafe<SurfacesContextProvider>;
+ ~SurfacesContextProvider() override;
private:
static void ContextLostThunk(void* closure) {
- static_cast<ContextProviderMojo*>(closure)->ContextLost();
+ static_cast<SurfacesContextProvider*>(closure)->ContextLost();
}
void ContextLost();
cc::ContextProvider::Capabilities capabilities_;
- ScopedMessagePipeHandle command_buffer_handle_;
+ mojo::ScopedMessagePipeHandle command_buffer_handle_;
MojoGLES2Context context_;
bool context_lost_;
LostContextCallback lost_context_callback_;
base::Lock context_lock_;
- DISALLOW_COPY_AND_ASSIGN(ContextProviderMojo);
+ DISALLOW_COPY_AND_ASSIGN(SurfacesContextProvider);
};
-} // namespace mojo
+} // namespace surfaces
-#endif // COMPONENTS_SURFACES_CONTEXT_PROVIDER_MOJO_H_
+#endif // COMPONENTS_SURFACES_SURFACES_CONTEXT_PROVIDER_H_

Powered by Google App Engine
This is Rietveld 408576698