| Index: webkit/default_plugin/plugin_impl_mac.h
|
| ===================================================================
|
| --- webkit/default_plugin/plugin_impl_mac.h (revision 47729)
|
| +++ webkit/default_plugin/plugin_impl_mac.h (working copy)
|
| @@ -9,7 +9,9 @@
|
| #include <vector>
|
|
|
| #include "third_party/npapi/bindings/npapi.h"
|
| -#include "gfx/native_widget_types.h"
|
| +// #include "webkit/default_plugin/install_dialog.h"
|
| +// #include "webkit/default_plugin/plugin_database_handler.h"
|
| +// #include "webkit/default_plugin/plugin_install_job_monitor.h"
|
|
|
| // Possible plugin installer states.
|
| enum PluginInstallerState {
|
| @@ -56,14 +58,14 @@
|
| bool Initialize(void *module_handle, NPP instance, NPMIMEType mime_type,
|
| int16 argc, char* argn[], char* argv[]);
|
|
|
| - // Informs the plugin of its window information.
|
| + // Displays the default plugin UI.
|
| //
|
| // Parameters:
|
| - // window_info
|
| - // The window info passed to npapi.
|
| - bool NPP_SetWindow(NPWindow* window_info);
|
| + // parent_window
|
| + // Handle to the parent window.
|
| + bool SetWindow(gfx::NativeView parent_view);
|
|
|
| - // Destroys the install dialog.
|
| + // Destroys the install dialog and the plugin window.
|
| void Shutdown();
|
|
|
| // Starts plugin download. Spawns the plugin installer after it is
|
| @@ -125,9 +127,7 @@
|
| // Describes why the notification was sent.
|
| void URLNotify(const char* url, NPReason reason);
|
|
|
| - // Used by the renderer to indicate plugin install through the infobar.
|
| - int16 NPP_HandleEvent(void* event);
|
| -
|
| + // gfx::NativeView window() const { return m_hWnd; }
|
| const std::string& mime_type() const { return mime_type_; }
|
|
|
| // Replaces a resource string with the placeholder passed in as an argument
|
| @@ -168,8 +168,6 @@
|
| bool IsRTLLayout() const;
|
|
|
| protected:
|
| - int16 OnDrawRect(CGContextRef context, CGRect dirty_rect);
|
| -
|
| // Displays the plugin install confirmation dialog.
|
| void ShowInstallDialog();
|
|
|
| @@ -268,15 +266,57 @@
|
|
|
| // The plugins opaque instance handle
|
| NPP instance_;
|
| + // If this is to install activex
|
| + bool is_activex_;
|
| + // The plugin instantiation mode (NP_FULL or NP_EMBED)
|
| + int16 mode_;
|
| + // The handle to the icon displayed in the plugin installation window.
|
| + // HICON icon_;
|
| + // The Get plugin link message string displayed at the top left corner of
|
| + // the plugin window.
|
| + std::wstring get_plugin_link_message_;
|
| + // The command string displayed in the plugin installation window.
|
| + std::wstring command_;
|
| + // An additional message displayed at times by the plugin.
|
| + std::wstring optional_additional_message_;
|
| // The current stream.
|
| NPStream* plugin_install_stream_;
|
| + // The plugin finder URL.
|
| + std::string plugin_finder_url_;
|
| // The desired mime type.
|
| std::string mime_type_;
|
| + // The desired language.
|
| + std::string desired_language_;
|
| + // The plugin name.
|
| + std::wstring plugin_name_;
|
| + // The actual download URL.
|
| + std::string plugin_download_url_;
|
| + // Indicates if the plugin download URL points to an exe.
|
| + bool plugin_download_url_for_display_;
|
| // The current state of the plugin installer.
|
| PluginInstallerState plugin_installer_state_;
|
| - // Dimensions of the plugin
|
| - uint32_t width_;
|
| - uint32_t height_;
|
| + // Used to display the UI for plugin installation.
|
| + // PluginInstallDialog install_dialog_;
|
| + // To enable auto refresh of the plugin window once the installation
|
| + // is complete, we spawn the installation process in a job, and monitor
|
| + // IO completion events on the job. When the active process count of the
|
| + // job falls to zero, we initiate an auto refresh of the plugin list
|
| + // which enables the downloaded plugin to be instantiated.
|
| + // The completion events from the job are monitored in an independent
|
| + // thread.
|
| + // scoped_refptr<PluginInstallationJobMonitorThread>
|
| + // installation_job_monitor_thread_;
|
| + // This object handles download and parsing of the plugins database.
|
| + // PluginDatabaseHandler plugin_database_handler_;
|
| + // Indicates if the left click to download/refresh should be enabled or not.
|
| + bool enable_click_;
|
| + // Handles to the fonts used to display text in the plugin window.
|
| + // HFONT bold_font_;
|
| + // HFONT regular_font_;
|
| + // HFONT underline_font_;
|
| + // Tooltip Window.
|
| + gfx::NativeWindow tooltip_;
|
| +
|
| DISALLOW_EVIL_CONSTRUCTORS(PluginInstallerImpl);
|
| };
|
|
|
|
|