OLD | NEW |
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 | 7 |
8 // Interface for browser interaction | 8 // Interface for browser interaction |
9 | 9 |
10 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_BROWSER_INTERFACE_H_ | 10 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_BROWSER_INTERFACE_H_ |
11 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_BROWSER_INTERFACE_H_ | 11 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_BROWSER_INTERFACE_H_ |
12 | 12 |
13 #include <stdio.h> | 13 #include <stdio.h> |
14 #include <map> | 14 #include <map> |
15 | 15 |
16 #include "native_client/src/include/nacl_macros.h" | 16 #include "native_client/src/include/nacl_macros.h" |
17 #include "native_client/src/include/nacl_string.h" | 17 #include "native_client/src/include/nacl_string.h" |
18 #include "native_client/src/include/portability.h" | 18 #include "native_client/src/include/portability.h" |
19 #include "ppapi/cpp/instance.h" | |
20 | 19 |
21 namespace pp { | 20 namespace pp { |
22 class InstancePrivate; | 21 class InstancePrivate; |
23 } // namespace | 22 } // namespace |
24 | 23 |
25 namespace plugin { | 24 namespace plugin { |
26 | 25 |
27 // BrowserInterface represents the interface to the browser from the plugin. | 26 // BrowserInterface represents the interface to the browser from the plugin. |
28 // I.e., when the plugin needs to request an alert, it uses these interfaces. | 27 // I.e., when the plugin needs to request an alert, it uses these interfaces. |
29 class BrowserInterface { | 28 class BrowserInterface { |
(...skipping 18 matching lines...) Expand all Loading... |
48 typedef std::map<nacl::string, uintptr_t> StringToIdentifierMap; | 47 typedef std::map<nacl::string, uintptr_t> StringToIdentifierMap; |
49 typedef std::map<uintptr_t, nacl::string> IdentifierToStringMap; | 48 typedef std::map<uintptr_t, nacl::string> IdentifierToStringMap; |
50 StringToIdentifierMap string_to_identifier_map_; | 49 StringToIdentifierMap string_to_identifier_map_; |
51 IdentifierToStringMap identifier_to_string_map_; | 50 IdentifierToStringMap identifier_to_string_map_; |
52 uintptr_t next_identifier; // will be incremented once used | 51 uintptr_t next_identifier; // will be incremented once used |
53 }; | 52 }; |
54 | 53 |
55 } // namespace plugin | 54 } // namespace plugin |
56 | 55 |
57 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_BROWSER_INTERFACE_H_ | 56 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_BROWSER_INTERFACE_H_ |
OLD | NEW |