OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_FRAME_CHROME_FRAME_NPAPI_H_ | 5 #ifndef CHROME_FRAME_CHROME_FRAME_NPAPI_H_ |
6 #define CHROME_FRAME_CHROME_FRAME_NPAPI_H_ | 6 #define CHROME_FRAME_CHROME_FRAME_NPAPI_H_ |
7 | 7 |
8 #include <atlbase.h> | 8 #include <atlbase.h> |
9 #include <atlwin.h> | 9 #include <atlwin.h> |
10 #include <string> | 10 #include <string> |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 bool SetWindow(NPWindow* window_info); | 70 bool SetWindow(NPWindow* window_info); |
71 void UrlNotify(const char* url, NPReason reason, void* notify_data); | 71 void UrlNotify(const char* url, NPReason reason, void* notify_data); |
72 NPError NewStream(NPMIMEType type, NPStream* stream, NPBool seekable, | 72 NPError NewStream(NPMIMEType type, NPStream* stream, NPBool seekable, |
73 uint16* stream_type); | 73 uint16* stream_type); |
74 int32 WriteReady(NPStream* stream); | 74 int32 WriteReady(NPStream* stream); |
75 int32 Write(NPStream* stream, int32 offset, int32 len, void* buffer); | 75 int32 Write(NPStream* stream, int32 offset, int32 len, void* buffer); |
76 NPError DestroyStream(NPStream* stream, NPReason reason); | 76 NPError DestroyStream(NPStream* stream, NPReason reason); |
77 | 77 |
78 void Print(NPPrint* print_info); | 78 void Print(NPPrint* print_info); |
79 | 79 |
| 80 // NavigationConstraints method overrides. |
| 81 virtual bool IsSchemeAllowed(const GURL& url); |
| 82 |
80 // NPObject functions, which ensure that the plugin object is scriptable. | 83 // NPObject functions, which ensure that the plugin object is scriptable. |
81 static bool HasMethod(NPObject* obj, NPIdentifier name); | 84 static bool HasMethod(NPObject* obj, NPIdentifier name); |
82 static bool Invoke(NPObject* header, NPIdentifier name, | 85 static bool Invoke(NPObject* header, NPIdentifier name, |
83 const NPVariant* args, uint32_t arg_count, | 86 const NPVariant* args, uint32_t arg_count, |
84 NPVariant* result); | 87 NPVariant* result); |
85 static NPObject* AllocateObject(NPP instance, NPClass* class_name); | 88 static NPObject* AllocateObject(NPP instance, NPClass* class_name); |
86 static void DeallocateObject(NPObject* header); | 89 static void DeallocateObject(NPObject* header); |
87 | 90 |
88 // Called by the scripting environment when the native code is shutdown. | 91 // Called by the scripting environment when the native code is shutdown. |
89 // Any attempt to message a NPObject instance after the invalidate callback | 92 // Any attempt to message a NPObject instance after the invalidate callback |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 // The value of src property keeping the current URL. | 351 // The value of src property keeping the current URL. |
349 std::string src_; | 352 std::string src_; |
350 // Used to fetch network resources when host network stack is in use. | 353 // Used to fetch network resources when host network stack is in use. |
351 NPAPIUrlRequestManager url_fetcher_; | 354 NPAPIUrlRequestManager url_fetcher_; |
352 | 355 |
353 // Set if we receive a navigation request before initializing Chrome. | 356 // Set if we receive a navigation request before initializing Chrome. |
354 bool navigate_after_initialization_; | 357 bool navigate_after_initialization_; |
355 }; | 358 }; |
356 | 359 |
357 #endif // CHROME_FRAME_CHROME_FRAME_NPAPI_H_ | 360 #endif // CHROME_FRAME_CHROME_FRAME_NPAPI_H_ |
OLD | NEW |