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

Side by Side Diff: components/mus/public/cpp/context_provider.h

Issue 1906623003: Convert //components/mus from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « components/mus/mus_app.cc ('k') | components/mus/public/cpp/input_event_handler.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_MUS_PUBLIC_CPP_CONTEXT_PROVIDER_H_ 5 #ifndef COMPONENTS_MUS_PUBLIC_CPP_CONTEXT_PROVIDER_H_
6 #define COMPONENTS_MUS_PUBLIC_CPP_CONTEXT_PROVIDER_H_ 6 #define COMPONENTS_MUS_PUBLIC_CPP_CONTEXT_PROVIDER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory>
11
10 #include "base/macros.h" 12 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/synchronization/lock.h" 13 #include "base/synchronization/lock.h"
13 #include "cc/output/context_provider.h" 14 #include "cc/output/context_provider.h"
14 #include "mojo/public/c/gles2/gles2_types.h" 15 #include "mojo/public/c/gles2/gles2_types.h"
15 #include "mojo/public/cpp/system/core.h" 16 #include "mojo/public/cpp/system/core.h"
16 17
17 namespace mus { 18 namespace mus {
18 19
19 class ContextProvider : public cc::ContextProvider { 20 class ContextProvider : public cc::ContextProvider {
20 public: 21 public:
21 explicit ContextProvider(mojo::ScopedMessagePipeHandle command_buffer_handle); 22 explicit ContextProvider(mojo::ScopedMessagePipeHandle command_buffer_handle);
(...skipping 16 matching lines...) Expand all
38 ~ContextProvider() override; 39 ~ContextProvider() override;
39 40
40 private: 41 private:
41 static void ContextLostThunk(void* closure) { 42 static void ContextLostThunk(void* closure) {
42 static_cast<ContextProvider*>(closure)->ContextLost(); 43 static_cast<ContextProvider*>(closure)->ContextLost();
43 } 44 }
44 void ContextLost(); 45 void ContextLost();
45 46
46 mojo::ScopedMessagePipeHandle command_buffer_handle_; 47 mojo::ScopedMessagePipeHandle command_buffer_handle_;
47 MojoGLES2Context context_; 48 MojoGLES2Context context_;
48 scoped_ptr<gpu::gles2::GLES2Interface> context_gl_; 49 std::unique_ptr<gpu::gles2::GLES2Interface> context_gl_;
49 50
50 base::Lock context_lock_; 51 base::Lock context_lock_;
51 52
52 DISALLOW_COPY_AND_ASSIGN(ContextProvider); 53 DISALLOW_COPY_AND_ASSIGN(ContextProvider);
53 }; 54 };
54 55
55 } // namespace mus 56 } // namespace mus
56 57
57 #endif // COMPONENTS_MUS_PUBLIC_CPP_CONTEXT_PROVIDER_H_ 58 #endif // COMPONENTS_MUS_PUBLIC_CPP_CONTEXT_PROVIDER_H_
OLDNEW
« no previous file with comments | « components/mus/mus_app.cc ('k') | components/mus/public/cpp/input_event_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698