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

Side by Side Diff: ppapi/native_client/src/trusted/plugin/desc_based_handle.h

Issue 8527020: Cleanup: Remove unneeded forward declarations in ppapi. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 * Copyright (c) 2011 The Chromium Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 // OBSOLETE -- this class provides support for passing NaClDescs between 7 // OBSOLETE -- this class provides support for passing NaClDescs between
8 // plugin instances. This support only exists in SRPC-mode plugins. 8 // plugin instances. This support only exists in SRPC-mode plugins.
9 // TODO(polina): remove when SRPC descriptor passing is removed. 9 // TODO(polina): remove when SRPC descriptor passing is removed.
10 10
11 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_DESC_BASED_HANDLE_H_ 11 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_DESC_BASED_HANDLE_H_
12 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_DESC_BASED_HANDLE_H_ 12 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_DESC_BASED_HANDLE_H_
13 13
14 #include <stdio.h> 14 #include <stdio.h>
15 #include <map> 15 #include <map>
16 16
17 #include "native_client/src/include/nacl_macros.h" 17 #include "native_client/src/include/nacl_macros.h"
18 #include "native_client/src/include/nacl_scoped_ptr.h" 18 #include "native_client/src/include/nacl_scoped_ptr.h"
19 #include "native_client/src/trusted/desc/nacl_desc_wrapper.h" 19 #include "native_client/src/trusted/desc/nacl_desc_wrapper.h"
20 #include "native_client/src/trusted/plugin/utility.h" 20 #include "native_client/src/trusted/plugin/utility.h"
21 21
22 struct NaClDesc; 22 struct NaClDesc;
23 23
24 namespace nacl { 24 namespace nacl {
25 class DescWrapper; 25 class DescWrapper;
26 } // namespace nacl 26 } // namespace nacl
27 27
28 namespace plugin { 28 namespace plugin {
29 29
30 class Plugin;
31
32 // DescBasedHandles are used to convey NaClDesc objects through JavaScript. 30 // DescBasedHandles are used to convey NaClDesc objects through JavaScript.
33 class DescBasedHandle { 31 class DescBasedHandle {
34 public: 32 public:
35 // Creates a new DescBasedHandle using the specified plugin and wrapper. 33 // Creates a new DescBasedHandle using the specified plugin and wrapper.
36 // Returns NULL if either plugin or wrapper is NULL. 34 // Returns NULL if either plugin or wrapper is NULL.
37 static DescBasedHandle* New(nacl::DescWrapper* wrapper); 35 static DescBasedHandle* New(nacl::DescWrapper* wrapper);
38 ~DescBasedHandle(); 36 ~DescBasedHandle();
39 37
40 // Because the factory ensured that wrapper was not NULL, dereferencing it 38 // Because the factory ensured that wrapper was not NULL, dereferencing it
41 // here is always safe. 39 // here is always safe.
42 NaClDesc* desc() const { return wrapper_->desc(); } 40 NaClDesc* desc() const { return wrapper_->desc(); }
43 41
44 private: 42 private:
45 NACL_DISALLOW_COPY_AND_ASSIGN(DescBasedHandle); 43 NACL_DISALLOW_COPY_AND_ASSIGN(DescBasedHandle);
46 explicit DescBasedHandle(nacl::DescWrapper* wrapper); 44 explicit DescBasedHandle(nacl::DescWrapper* wrapper);
47 nacl::scoped_ptr<nacl::DescWrapper> wrapper_; 45 nacl::scoped_ptr<nacl::DescWrapper> wrapper_;
48 }; 46 };
49 47
50 } // namespace plugin 48 } // namespace plugin
51 49
52 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_DESC_BASED_HANDLE_H_ 50 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_DESC_BASED_HANDLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698