| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PUBLIC_BROWSER_BROWSER_PPAPI_HOST_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_PPAPI_HOST_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_PPAPI_HOST_H_ | 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_PPAPI_HOST_H_ |
| 7 | 7 |
| 8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
| 9 #include "base/process/process.h" | 9 #include "base/process/process.h" |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 | 49 |
| 50 // Returns the PpapiHost object. | 50 // Returns the PpapiHost object. |
| 51 virtual ppapi::host::PpapiHost* GetPpapiHost() = 0; | 51 virtual ppapi::host::PpapiHost* GetPpapiHost() = 0; |
| 52 | 52 |
| 53 // Returns the handle to the plugin process. | 53 // Returns the handle to the plugin process. |
| 54 virtual base::ProcessHandle GetPluginProcessHandle() const = 0; | 54 virtual base::ProcessHandle GetPluginProcessHandle() const = 0; |
| 55 | 55 |
| 56 // Returns true if the given PP_Instance is valid. | 56 // Returns true if the given PP_Instance is valid. |
| 57 virtual bool IsValidInstance(PP_Instance instance) const = 0; | 57 virtual bool IsValidInstance(PP_Instance instance) const = 0; |
| 58 | 58 |
| 59 // Retrieves the process/view Ids associated with the RenderView containing | 59 // Retrieves the process/frame Ids associated with the RenderFrame containing |
| 60 // the given instance and returns true on success. If the instance is | 60 // the given instance and returns true on success. If the instance is |
| 61 // invalid, the ids will be 0 and false will be returned. | 61 // invalid, the ids will be 0 and false will be returned. |
| 62 // | 62 // |
| 63 // When a resource is created, the PP_Instance should already have been | 63 // When a resource is created, the PP_Instance should already have been |
| 64 // validated, and the resource hosts will be deleted when the resource is | 64 // validated, and the resource hosts will be deleted when the resource is |
| 65 // destroyed. So it should not generally be necessary to check for errors | 65 // destroyed. So it should not generally be necessary to check for errors |
| 66 // from this function except as a last-minute sanity check if you convert the | 66 // from this function except as a last-minute sanity check if you convert the |
| 67 // IDs to a RenderView/ProcessHost on the UI thread. | 67 // IDs to a RenderFrame/ProcessHost on the UI thread. |
| 68 virtual bool GetRenderViewIDsForInstance(PP_Instance instance, | 68 virtual bool GetRenderFrameIDsForInstance(PP_Instance instance, |
| 69 int* render_process_id, | 69 int* render_process_id, |
| 70 int* render_view_id) const = 0; | 70 int* render_frame_id) const = 0; |
| 71 | 71 |
| 72 // Returns the name of the plugin. | 72 // Returns the name of the plugin. |
| 73 virtual const std::string& GetPluginName() = 0; | 73 virtual const std::string& GetPluginName() = 0; |
| 74 | 74 |
| 75 // Returns the path of the plugin. | 75 // Returns the path of the plugin. |
| 76 virtual const base::FilePath& GetPluginPath() = 0; | 76 virtual const base::FilePath& GetPluginPath() = 0; |
| 77 | 77 |
| 78 // Returns the user's profile data directory. | 78 // Returns the user's profile data directory. |
| 79 virtual const base::FilePath& GetProfileDataDirectory() = 0; | 79 virtual const base::FilePath& GetProfileDataDirectory() = 0; |
| 80 | 80 |
| 81 // Get the Document/Plugin URLs for the given PP_Instance. | 81 // Get the Document/Plugin URLs for the given PP_Instance. |
| 82 virtual GURL GetDocumentURLForInstance(PP_Instance instance) = 0; | 82 virtual GURL GetDocumentURLForInstance(PP_Instance instance) = 0; |
| 83 virtual GURL GetPluginURLForInstance(PP_Instance instance) = 0; | 83 virtual GURL GetPluginURLForInstance(PP_Instance instance) = 0; |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 } // namespace content | 86 } // namespace content |
| 87 | 87 |
| 88 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_PPAPI_HOST_H_ | 88 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_PPAPI_HOST_H_ |
| OLD | NEW |