diff options
-rw-r--r-- | chrome/browser/plugin_installer.h | 5 | ||||
-rw-r--r-- | chrome/browser/plugin_service.h | 17 | ||||
-rw-r--r-- | chrome/browser/printing/print_job.h | 4 | ||||
-rw-r--r-- | chrome/browser/search_engines/template_url_fetcher.h | 18 | ||||
-rw-r--r-- | chrome/browser/shell_dialogs.h | 10 | ||||
-rw-r--r-- | chrome/browser/tab_contents/web_contents.cc | 3 | ||||
-rw-r--r-- | chrome/browser/tab_contents/web_contents_view.h | 5 | ||||
-rw-r--r-- | chrome/browser/tab_contents/web_contents_view_win.cc | 5 |
8 files changed, 39 insertions, 28 deletions
diff --git a/chrome/browser/plugin_installer.h b/chrome/browser/plugin_installer.h index 9e11178..642e643 100644 --- a/chrome/browser/plugin_installer.h +++ b/chrome/browser/plugin_installer.h @@ -19,6 +19,7 @@ class PluginInstaller : public ConfirmInfoBarDelegate { void OnMissingPluginStatus(int status); // A new page starts loading. This is the perfect time to close the info bar. void OnStartLoading(); + private: // Overridden from ConfirmInfoBarDelegate: virtual std::wstring GetMessageText() const; @@ -30,7 +31,7 @@ class PluginInstaller : public ConfirmInfoBarDelegate { // The containing WebContents WebContents* web_contents_; - DISALLOW_EVIL_CONSTRUCTORS(PluginInstaller); + DISALLOW_COPY_AND_ASSIGN(PluginInstaller); }; -#endif +#endif // CHROME_BROWSER_PLUGIN_INSTALLER_H_ diff --git a/chrome/browser/plugin_service.h b/chrome/browser/plugin_service.h index 3bca25f..d7ad9ae 100644 --- a/chrome/browser/plugin_service.h +++ b/chrome/browser/plugin_service.h @@ -5,8 +5,8 @@ // This class responds to requests from renderers for the list of plugins, and // also a proxy object for plugin instances. -#ifndef CHROME_BROWSER_PLUGIN_SERVICE_H__ -#define CHROME_BROWSER_PLUGIN_SERVICE_H__ +#ifndef CHROME_BROWSER_PLUGIN_SERVICE_H_ +#define CHROME_BROWSER_PLUGIN_SERVICE_H_ #include <vector> @@ -141,8 +141,7 @@ class PluginService { Lock lock_; // Handles plugin process shutdown. - class ShutdownHandler : - public base::RefCountedThreadSafe<ShutdownHandler> { + class ShutdownHandler : public base::RefCountedThreadSafe<ShutdownHandler> { public: ShutdownHandler() {} ~ShutdownHandler() {} @@ -152,16 +151,16 @@ class PluginService { void InitiateShutdown(); private: - // Shutdown handler which runs on the io thread. - void OnShutdown(); + // Shutdown handler which runs on the io thread. + void OnShutdown(); - DISALLOW_EVIL_CONSTRUCTORS(ShutdownHandler); + DISALLOW_COPY_AND_ASSIGN(ShutdownHandler); }; friend class ShutdownHandler; scoped_refptr<ShutdownHandler> plugin_shutdown_handler_; - DISALLOW_EVIL_CONSTRUCTORS(PluginService); + DISALLOW_COPY_AND_ASSIGN(PluginService); }; // The PluginProcessHostIterator allows to iterate through all the @@ -214,4 +213,4 @@ class PluginProcessHostIterator { PluginService::PluginMap::const_iterator end_; }; -#endif // CHROME_BROWSER_PLUGIN_SERVICE_H__ +#endif // CHROME_BROWSER_PLUGIN_SERVICE_H_ diff --git a/chrome/browser/printing/print_job.h b/chrome/browser/printing/print_job.h index 4c334b9..f67cc7b 100644 --- a/chrome/browser/printing/print_job.h +++ b/chrome/browser/printing/print_job.h @@ -5,6 +5,8 @@ #ifndef CHROME_BROWSER_PRINTING_PRINT_JOB_H_ #define CHROME_BROWSER_PRINTING_PRINT_JOB_H_ +#include "base/basictypes.h" +#include "base/gfx/native_widget_types.h" #include "base/message_loop.h" #include "base/ref_counted.h" #include "chrome/browser/printing/print_job_worker_owner.h" @@ -82,7 +84,7 @@ class PrintJob : public base::RefCountedThreadSafe<PrintJob>, // box. It is unused when |ask_for_user_settings| is DEFAULTS. No-op if a // print job is active. void GetSettings(GetSettingsAskParam ask_user_for_settings, - HWND parent_window); + gfx::NativeView parent_window); // Starts the actual printing. Signals the worker that it should begin to // spool as soon as data is available. diff --git a/chrome/browser/search_engines/template_url_fetcher.h b/chrome/browser/search_engines/template_url_fetcher.h index 76917ca..7b429a7 100644 --- a/chrome/browser/search_engines/template_url_fetcher.h +++ b/chrome/browser/search_engines/template_url_fetcher.h @@ -2,9 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_TEMPLATE_URL_FETCHER_H__ -#define CHROME_BROWSER_TEMPLATE_URL_FETCHER_H__ +#ifndef CHROME_BROWSER_TEMPLATE_URL_FETCHER_H_ +#define CHROME_BROWSER_TEMPLATE_URL_FETCHER_H_ +#include "base/gfx/native_widget_types.h" #include "chrome/browser/net/url_fetcher.h" #include "chrome/browser/profile.h" #include "chrome/common/scoped_vector.h" @@ -29,7 +30,7 @@ class TemplateURLFetcher { void ScheduleDownload(const std::wstring& keyword, const GURL& osdd_url, const GURL& favicon_url, - const HWND parent_window, + const gfx::NativeView parent_window, bool autodetected); private: @@ -43,7 +44,7 @@ class TemplateURLFetcher { const std::wstring& keyword, const GURL& osdd_url, const GURL& favicon_url, - const HWND parent_window, + gfx::NativeView parent_window, bool autodetected) #pragma warning(disable:4355) : url_fetcher_(osdd_url, URLFetcher::GET, this), @@ -82,9 +83,9 @@ class TemplateURLFetcher { // Used to determine where to place a confirmation dialog. May be NULL, // in which case the confirmation will be centered in the screen if needed. - const HWND parent_window_; + gfx::NativeView parent_window_; - DISALLOW_EVIL_CONSTRUCTORS(RequestDelegate); + DISALLOW_COPY_AND_ASSIGN(RequestDelegate); }; Profile* profile() const { return profile_; } @@ -97,8 +98,7 @@ class TemplateURLFetcher { // In progress requests. ScopedVector<RequestDelegate> requests_; - DISALLOW_EVIL_CONSTRUCTORS(TemplateURLFetcher); + DISALLOW_COPY_AND_ASSIGN(TemplateURLFetcher); }; -#endif // CHROME_BROWSER_OSDD_FETCHER_H__ - +#endif // CHROME_BROWSER_OSDD_FETCHER_H_ diff --git a/chrome/browser/shell_dialogs.h b/chrome/browser/shell_dialogs.h index de81210..cef931d 100644 --- a/chrome/browser/shell_dialogs.h +++ b/chrome/browser/shell_dialogs.h @@ -68,7 +68,7 @@ class SelectFileDialog static SelectFileDialog* Create(Listener* listener); // Selects a file. This will start displaying the dialog box. This will also - // block the calling HWND until the dialog box is complete. The listener + // block the calling window until the dialog box is complete. The listener // associated with this object will be notified when the selection is // complete. // |type| is the type of file dialog to be shown, see Type enumeration above. @@ -80,14 +80,14 @@ class SelectFileDialog // show. // |filter| is a null (\0) separated list of alternating filter description // and filters and terminated with two nulls. - // |owning_hwnd| is the window the dialog is modal to, or NULL for a modeless - // dialog. + // |owning_window| is the window the dialog is modal to, or NULL for a + // modeless dialog. // |default_extension| is the default extension to add to the file if the // user doesn't type one. This should NOT include the '.'. If you specify // this you must also specify a filter. // |params| is data from the calling context which will be passed through to // the listener. Can be NULL. - // NOTE: only one instance of any shell dialog can be shown per owning_hwnd + // NOTE: only one instance of any shell dialog can be shown per owning_window // at a time (for obvious reasons). virtual void SelectFile(Type type, const std::wstring& title, @@ -133,7 +133,7 @@ class SelectFontDialog // modeless dialog. // |params| is data from the calling context which will be passed through to // the listener. Can be NULL. - // NOTE: only one instance of any shell dialog can be shown per owning_hwnd + // NOTE: only one instance of any shell dialog can be shown per owning_window // at a time (for obvious reasons). // TODO(beng): support specifying the default font selected in the list when // the dialog appears. diff --git a/chrome/browser/tab_contents/web_contents.cc b/chrome/browser/tab_contents/web_contents.cc index b834972..9d6543f 100644 --- a/chrome/browser/tab_contents/web_contents.cc +++ b/chrome/browser/tab_contents/web_contents.cc @@ -34,7 +34,6 @@ #include "chrome/browser/search_engines/template_url_model.h" #include "chrome/browser/tab_contents/navigation_entry.h" #include "chrome/browser/tab_contents/web_contents_view.h" -#include "chrome/browser/tab_contents/web_contents_view_win.h" #include "chrome/browser/views/hung_renderer_view.h" // TODO(brettw) delete me. #include "chrome/common/chrome_switches.h" #include "chrome/common/l10n_util.h" @@ -180,7 +179,7 @@ WebContents::WebContents(Profile* profile, int routing_id, base::WaitableEvent* modal_dialog_event) : TabContents(TAB_CONTENTS_WEB), - view_(new WebContentsViewWin(this)), + view_(WebContentsView::Create(this)), ALLOW_THIS_IN_INITIALIZER_LIST( render_manager_(render_view_factory, this, this)), render_view_factory_(render_view_factory), diff --git a/chrome/browser/tab_contents/web_contents_view.h b/chrome/browser/tab_contents/web_contents_view.h index 309a33d..32246e7 100644 --- a/chrome/browser/tab_contents/web_contents_view.h +++ b/chrome/browser/tab_contents/web_contents_view.h @@ -37,6 +37,11 @@ class WebContentsView : public RenderViewHostDelegate::View { public: virtual ~WebContentsView() {} + // Creates the appropriate type of WebContentsView for the current system. + // The return value is a new heap allocated view with ownership passing to + // the caller. + static WebContentsView* Create(WebContents* web_contents); + virtual WebContents* GetWebContents() = 0; virtual void CreateView() = 0; diff --git a/chrome/browser/tab_contents/web_contents_view_win.cc b/chrome/browser/tab_contents/web_contents_view_win.cc index e93916e..b72a697 100644 --- a/chrome/browser/tab_contents/web_contents_view_win.cc +++ b/chrome/browser/tab_contents/web_contents_view_win.cc @@ -40,6 +40,11 @@ BOOL CALLBACK DetachPluginWindowsCallback(HWND window, LPARAM param) { } // namespace +// static +WebContentsView* WebContentsView::Create(WebContents* web_contents) { + return new WebContentsViewWin(web_contents); +} + WebContentsViewWin::WebContentsViewWin(WebContents* web_contents) : web_contents_(web_contents), ignore_next_char_event_(false) { |