| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_DEFAULT_PLUGIN_PLUGIN_IMPL_MAC_H_ | 5 #ifndef CHROME_DEFAULT_PLUGIN_PLUGIN_IMPL_MAC_H_ |
| 6 #define CHROME_DEFAULT_PLUGIN_PLUGIN_IMPL_MAC_H_ | 6 #define CHROME_DEFAULT_PLUGIN_PLUGIN_IMPL_MAC_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "chrome/default_plugin/plugin_installer_base.h" |
| 11 #include "third_party/npapi/bindings/npapi.h" | 12 #include "third_party/npapi/bindings/npapi.h" |
| 12 #include "ui/gfx/native_widget_types.h" | 13 #include "ui/gfx/native_widget_types.h" |
| 13 | 14 |
| 14 #ifdef __OBJC__ | 15 #ifdef __OBJC__ |
| 15 @class NSImage; | 16 @class NSImage; |
| 16 @class NSString; | 17 @class NSString; |
| 17 #else | 18 #else |
| 18 class NSImage; | 19 class NSImage; |
| 19 class NSString; | 20 class NSString; |
| 20 #endif | 21 #endif |
| (...skipping 11 matching lines...) Expand all Loading... |
| 32 PluginInstallerLaunchSuccess, | 33 PluginInstallerLaunchSuccess, |
| 33 PluginInstallerLaunchFailure | 34 PluginInstallerLaunchFailure |
| 34 }; | 35 }; |
| 35 | 36 |
| 36 class PluginInstallDialog; | 37 class PluginInstallDialog; |
| 37 class PluginDatabaseHandler; | 38 class PluginDatabaseHandler; |
| 38 | 39 |
| 39 // Provides the plugin installation functionality. This class is | 40 // Provides the plugin installation functionality. This class is |
| 40 // instantiated with the information like the mime type of the | 41 // instantiated with the information like the mime type of the |
| 41 // target plugin, the display mode, etc. | 42 // target plugin, the display mode, etc. |
| 42 class PluginInstallerImpl { | 43 class PluginInstallerImpl : public PluginInstallerBase { |
| 43 public: | 44 public: |
| 44 // mode is the plugin instantiation mode, i.e. whether it is a full | 45 // mode is the plugin instantiation mode, i.e. whether it is a full |
| 45 // page plugin (NP_FULL) or an embedded plugin (NP_EMBED) | 46 // page plugin (NP_FULL) or an embedded plugin (NP_EMBED) |
| 46 explicit PluginInstallerImpl(int16 mode); | 47 explicit PluginInstallerImpl(int16 mode); |
| 47 virtual ~PluginInstallerImpl(); | 48 virtual ~PluginInstallerImpl(); |
| 48 | 49 |
| 49 // Initializes the plugin with the instance information, mime type | 50 // Initializes the plugin with the instance information, mime type |
| 50 // and the list of parameters passed down to the plugin from the webpage. | 51 // and the list of parameters passed down to the plugin from the webpage. |
| 51 // | 52 // |
| 52 // Parameters: | 53 // Parameters: |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 // Handles notifications received in response to GetURLNotify calls issued | 127 // Handles notifications received in response to GetURLNotify calls issued |
| 127 // by the plugin. | 128 // by the plugin. |
| 128 // | 129 // |
| 129 // Parameters: | 130 // Parameters: |
| 130 // url | 131 // url |
| 131 // Pointer to the URL. | 132 // Pointer to the URL. |
| 132 // reason | 133 // reason |
| 133 // Describes why the notification was sent. | 134 // Describes why the notification was sent. |
| 134 void URLNotify(const char* url, NPReason reason); | 135 void URLNotify(const char* url, NPReason reason); |
| 135 | 136 |
| 136 // Used by the renderer to indicate plugin install through the infobar. | 137 // Used by the renderer to pass events (for e.g. input events) to the plugin. |
| 137 int16 NPP_HandleEvent(void* event); | 138 int16 NPP_HandleEvent(void* event); |
| 138 | 139 |
| 139 const std::string& mime_type() const { return mime_type_; } | 140 const std::string& mime_type() const { return mime_type_; } |
| 140 | 141 |
| 141 // Replaces a resource string with the placeholder passed in as an argument | 142 // Replaces a resource string with the placeholder passed in as an argument |
| 142 // | 143 // |
| 143 // Parameters: | 144 // Parameters: |
| 144 // message_id_with_placeholders | 145 // message_id_with_placeholders |
| 145 // The resource id of the string with placeholders. This is only used if | 146 // The resource id of the string with placeholders. This is only used if |
| 146 // the placeholder string (the replacement_string) parameter is valid. | 147 // the placeholder string (the replacement_string) parameter is valid. |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 // Plugin icon, weak (owned by ResourceBundle). | 289 // Plugin icon, weak (owned by ResourceBundle). |
| 289 NSImage* image_; | 290 NSImage* image_; |
| 290 // Displayed text | 291 // Displayed text |
| 291 NSString* command_; | 292 NSString* command_; |
| 292 | 293 |
| 293 DISALLOW_COPY_AND_ASSIGN(PluginInstallerImpl); | 294 DISALLOW_COPY_AND_ASSIGN(PluginInstallerImpl); |
| 294 }; | 295 }; |
| 295 | 296 |
| 296 | 297 |
| 297 #endif // CHROME_DEFAULT_PLUGIN_PLUGIN_IMPL_MAC_H_ | 298 #endif // CHROME_DEFAULT_PLUGIN_PLUGIN_IMPL_MAC_H_ |
| OLD | NEW |