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 WEBKIT_DEFAULT_PLUGIN_PLUGIN_IMPL_WIN_H_ | 5 #ifndef CHROME_DEFAULT_PLUGIN_PLUGIN_IMPL_WIN_H_ |
6 #define WEBKIT_DEFAULT_PLUGIN_PLUGIN_IMPL_WIN_H_ | 6 #define CHROME_DEFAULT_PLUGIN_PLUGIN_IMPL_WIN_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
| 11 #include "chrome/default_plugin/install_dialog.h" |
| 12 #include "chrome/default_plugin/plugin_database_handler.h" |
| 13 #include "chrome/default_plugin/plugin_install_job_monitor.h" |
11 #include "gfx/window_impl.h" | 14 #include "gfx/window_impl.h" |
12 #include "third_party/npapi/bindings/npapi.h" | 15 #include "third_party/npapi/bindings/npapi.h" |
13 #include "webkit/default_plugin/install_dialog.h" | |
14 #include "webkit/default_plugin/plugin_database_handler.h" | |
15 #include "webkit/default_plugin/plugin_install_job_monitor.h" | |
16 | 16 |
17 // Possible plugin installer states. | 17 // Possible plugin installer states. |
18 enum PluginInstallerState { | 18 enum PluginInstallerState { |
19 PluginInstallerStateUndefined, | 19 PluginInstallerStateUndefined, |
20 PluginListDownloadInitiated, | 20 PluginListDownloadInitiated, |
21 PluginListDownloaded, | 21 PluginListDownloaded, |
22 PluginListDownloadedPluginNotFound, | 22 PluginListDownloadedPluginNotFound, |
23 PluginListDownloadFailed, | 23 PluginListDownloadFailed, |
24 PluginDownloadInitiated, | 24 PluginDownloadInitiated, |
25 PluginDownloadCompleted, | 25 PluginDownloadCompleted, |
26 PluginDownloadFailed, | 26 PluginDownloadFailed, |
27 PluginInstallerLaunchSuccess, | 27 PluginInstallerLaunchSuccess, |
28 PluginInstallerLaunchFailure | 28 PluginInstallerLaunchFailure |
29 }; | 29 }; |
30 | 30 |
31 class PluginInstallDialog; | 31 class PluginInstallDialog; |
32 class PluginDatabaseHandler; | 32 class PluginDatabaseHandler; |
33 | 33 |
34 // Provides the plugin installation functionality. This class is | 34 // Provides the plugin installation functionality. This class is |
35 // instantiated with the information like the mime type of the | 35 // instantiated with the information like the mime type of the |
36 // target plugin, the display mode, etc. | 36 // target plugin, the display mode, etc. |
37 class PluginInstallerImpl : public gfx::WindowImpl { | 37 class PluginInstallerImpl : public gfx::WindowImpl { |
38 public: | 38 public: |
39 static const int kRefreshPluginsMessage = WM_APP + 1; | 39 static const int kRefreshPluginsMessage = WM_APP + 1; |
40 static const int kInstallMissingPluginMessage = WM_APP + 2; | |
41 | 40 |
42 // mode is the plugin instantiation mode, i.e. whether it is a full | 41 // mode is the plugin instantiation mode, i.e. whether it is a full |
43 // page plugin (NP_FULL) or an embedded plugin (NP_EMBED) | 42 // page plugin (NP_FULL) or an embedded plugin (NP_EMBED) |
44 explicit PluginInstallerImpl(int16 mode); | 43 explicit PluginInstallerImpl(int16 mode); |
45 virtual ~PluginInstallerImpl(); | 44 virtual ~PluginInstallerImpl(); |
46 | 45 |
47 BEGIN_MSG_MAP_EX(PluginInstallerImpl) | 46 BEGIN_MSG_MAP_EX(PluginInstallerImpl) |
48 MESSAGE_HANDLER(WM_ERASEBKGND, OnEraseBackGround) | 47 MESSAGE_HANDLER(WM_ERASEBKGND, OnEraseBackGround) |
49 MESSAGE_HANDLER(WM_PAINT, OnPaint) | 48 MESSAGE_HANDLER(WM_PAINT, OnPaint) |
50 MESSAGE_HANDLER(WM_LBUTTONDOWN, OnLButtonDown) | 49 MESSAGE_HANDLER(WM_LBUTTONDOWN, OnLButtonDown) |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 HFONT bold_font_; | 306 HFONT bold_font_; |
308 HFONT regular_font_; | 307 HFONT regular_font_; |
309 HFONT underline_font_; | 308 HFONT underline_font_; |
310 // Tooltip Window. | 309 // Tooltip Window. |
311 HWND tooltip_; | 310 HWND tooltip_; |
312 | 311 |
313 DISALLOW_COPY_AND_ASSIGN(PluginInstallerImpl); | 312 DISALLOW_COPY_AND_ASSIGN(PluginInstallerImpl); |
314 }; | 313 }; |
315 | 314 |
316 | 315 |
317 #endif // WEBKIT_DEFAULT_PLUGIN_PLUGIN_IMPL_WIN_H_ | 316 #endif // CHROME_DEFAULT_PLUGIN_PLUGIN_IMPL_WIN_H_ |
OLD | NEW |