Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(606)

Side by Side Diff: webkit/default_plugin/install_dialog.h

Issue 179051: Fix two issues with the plugin installer.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/api/src/WebKit.cpp ('k') | webkit/default_plugin/install_dialog.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_INSTALL_DIALOG_H__ 5 #ifndef WEBKIT_DEFAULT_PLUGIN_INSTALL_DIALOG_H__
6 #define WEBKIT_DEFAULT_PLUGIN_INSTALL_DIALOG_H__ 6 #define WEBKIT_DEFAULT_PLUGIN_INSTALL_DIALOG_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>
11 #include <vector>
11 12
12 #include "webkit/default_plugin/default_plugin_resources.h" 13 #include "webkit/default_plugin/default_plugin_resources.h"
13 14
14 class PluginInstallerImpl; 15 class PluginInstallerImpl;
15 16
16 // Displays the plugin installation dialog containing information 17 // Displays the plugin installation dialog containing information
17 // about the mime type of the plugin being downloaded, the URL 18 // about the mime type of the plugin being downloaded, the URL
18 // where it would be downloaded from, etc. 19 // where it would be downloaded from, etc.
19 class PluginInstallDialog : public CDialogImpl<PluginInstallDialog> { 20 class PluginInstallDialog : public CDialogImpl<PluginInstallDialog> {
20 public: 21 public:
21 PluginInstallDialog()
22 : plugin_impl_(NULL) {
23 }
24 ~PluginInstallDialog() {}
25
26 enum {IDD = IDD_DEFAULT_PLUGIN_INSTALL_DIALOG}; 22 enum {IDD = IDD_DEFAULT_PLUGIN_INSTALL_DIALOG};
27 23
28 BEGIN_MSG_MAP(PluginInstallDialog) 24 BEGIN_MSG_MAP(PluginInstallDialog)
29 MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) 25 MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
30 COMMAND_ID_HANDLER(IDB_GET_THE_PLUGIN, OnGetPlugin) 26 COMMAND_ID_HANDLER(IDB_GET_THE_PLUGIN, OnGetPlugin)
31 COMMAND_ID_HANDLER(IDCANCEL, OnCancel) 27 COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
32 END_MSG_MAP() 28 END_MSG_MAP()
33 29
34 bool Initialize(PluginInstallerImpl* plugin_impl, 30 // Creates or returns the existing object for the given plugin name.
35 const std::wstring& plugin_name); 31 // Call RemoveInstaller when done.
32 static PluginInstallDialog* AddInstaller(PluginInstallerImpl* plugin_impl,
33 const std::wstring& plugin_name);
34
35 // Lets this object know that the given installer object is going away.
36 void RemoveInstaller(PluginInstallerImpl* installer);
37
38 void ShowInstallDialog();
39
40 private:
41 PluginInstallDialog(const std::wstring& plugin_name);
42 ~PluginInstallDialog();
36 43
37 // Implemented to ensure that we handle RTL layouts correctly. 44 // Implemented to ensure that we handle RTL layouts correctly.
38 HWND Create(HWND parent_window, LPARAM init_param); 45 HWND Create(HWND parent_window, LPARAM init_param);
39 46
40 protected:
41 LRESULT OnInitDialog(UINT message, WPARAM wparam, LPARAM lparam, 47 LRESULT OnInitDialog(UINT message, WPARAM wparam, LPARAM lparam,
42 BOOL& handled); 48 BOOL& handled);
43 LRESULT OnGetPlugin(WORD notify_code, WORD id, HWND wnd_ctl, BOOL &handled); 49 LRESULT OnGetPlugin(WORD notify_code, WORD id, HWND wnd_ctl, BOOL &handled);
44 LRESULT OnCancel(WORD notify_code, WORD id, HWND wnd_ctl, BOOL &handled); 50 LRESULT OnCancel(WORD notify_code, WORD id, HWND wnd_ctl, BOOL &handled);
45 51
46 // Determines whether the UI layout is right-to-left.
47 bool IsRTLLayout() const;
48
49 // Wraps the string with Unicode directionality characters in order to make 52 // Wraps the string with Unicode directionality characters in order to make
50 // sure BiDi text is rendered correctly when the UI layout is right-to-left. 53 // sure BiDi text is rendered correctly when the UI layout is right-to-left.
51 void AdjustTextDirectionality(std::wstring* text) const; 54 void AdjustTextDirectionality(std::wstring* text) const;
52 55
53 PluginInstallerImpl* plugin_impl_; 56 std::vector<PluginInstallerImpl*> installers_;
54 std::wstring plugin_name_; 57 std::wstring plugin_name_;
55 }; 58 };
56 59
57 #endif // WEBKIT_DEFAULT_PLUGIN_INSTALL_DIALOG_H__ 60 #endif // WEBKIT_DEFAULT_PLUGIN_INSTALL_DIALOG_H__
OLDNEW
« no previous file with comments | « webkit/api/src/WebKit.cpp ('k') | webkit/default_plugin/install_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698