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

Side by Side Diff: content/child/child_io_surface_manager_mac.h

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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 | « content/child/blink_platform_impl.cc ('k') | content/child/child_io_surface_manager_mac.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 CONTENT_CHILD_CHILD_IO_SURFACE_MANAGER_MAC_H_ 5 #ifndef CONTENT_CHILD_CHILD_IO_SURFACE_MANAGER_MAC_H_
6 #define CONTENT_CHILD_CHILD_IO_SURFACE_MANAGER_MAC_H_ 6 #define CONTENT_CHILD_CHILD_IO_SURFACE_MANAGER_MAC_H_
7 7
8 #include "base/mac/scoped_mach_port.h" 8 #include "base/mac/scoped_mach_port.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 27 matching lines...) Expand all
38 38
39 // Set the token used when communicating with the Mach service. 39 // Set the token used when communicating with the Mach service.
40 // Note: This can be called on any thread but must happen before the 40 // Note: This can be called on any thread but must happen before the
41 // thread-safe IOSurfaceManager interface is used. It is the responsibility 41 // thread-safe IOSurfaceManager interface is used. It is the responsibility
42 // of users of this class to ensure there are no races. 42 // of users of this class to ensure there are no races.
43 void set_token(const IOSurfaceManagerToken& token) { 43 void set_token(const IOSurfaceManagerToken& token) {
44 token_ = token; 44 token_ = token;
45 } 45 }
46 46
47 private: 47 private:
48 friend struct DefaultSingletonTraits<ChildIOSurfaceManager>; 48 friend struct base::DefaultSingletonTraits<ChildIOSurfaceManager>;
49 49
50 ChildIOSurfaceManager(); 50 ChildIOSurfaceManager();
51 ~ChildIOSurfaceManager() override; 51 ~ChildIOSurfaceManager() override;
52 52
53 base::mac::ScopedMachSendRight service_port_; 53 base::mac::ScopedMachSendRight service_port_;
54 IOSurfaceManagerToken token_; 54 IOSurfaceManagerToken token_;
55 55
56 DISALLOW_COPY_AND_ASSIGN(ChildIOSurfaceManager); 56 DISALLOW_COPY_AND_ASSIGN(ChildIOSurfaceManager);
57 }; 57 };
58 58
59 } // namespace content 59 } // namespace content
60 60
61 #endif // CONTENT_CHILD_CHILD_IO_SURFACE_MANAGER_MAC_H_ 61 #endif // CONTENT_CHILD_CHILD_IO_SURFACE_MANAGER_MAC_H_
OLDNEW
« no previous file with comments | « content/child/blink_platform_impl.cc ('k') | content/child/child_io_surface_manager_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698