diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-14 01:12:38 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-14 01:12:38 +0000 |
commit | d60cd48c0f4e822b3f14b72ef95667845aefce29 (patch) | |
tree | 0ff1158c36c6b60be74bf23bec59bd08726e9287 /base/window_impl.h | |
parent | ed3ce0d59e2f52f805a8a76b112bfd48156416d0 (diff) | |
download | chromium_src-d60cd48c0f4e822b3f14b72ef95667845aefce29.zip chromium_src-d60cd48c0f4e822b3f14b72ef95667845aefce29.tar.gz chromium_src-d60cd48c0f4e822b3f14b72ef95667845aefce29.tar.bz2 |
Change PluginInstallImpl to use base::WindowImpl instead of CWindowImpl to reduce a dependency on ATL.
BUG=5023
TEST=Uninstall flash. Visit hulu.com and install the flash plugin.
Review URL: http://codereview.chromium.org/165469
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23406 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/window_impl.h')
-rw-r--r-- | base/window_impl.h | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/base/window_impl.h b/base/window_impl.h index 30c6298..2941c3d9 100644 --- a/base/window_impl.h +++ b/base/window_impl.h @@ -18,6 +18,19 @@ namespace base { +// An interface implemented by classes that use message maps. +// ProcessWindowMessage is implemented by the BEGIN_MESSAGE_MAP_EX macro. +class MessageMapInterface { + public: + // Processes one message from the window's message queue. + virtual BOOL ProcessWindowMessage(HWND window, + UINT message, + WPARAM w_param, + LPARAM l_param, + LRESULT& result, + DWORD msg_mad_id = 0) = 0; +}; + /////////////////////////////////////////////////////////////////////////////// // // WindowImpl @@ -26,24 +39,20 @@ namespace base { // Windows. // /////////////////////////////////////////////////////////////////////////////// -class WindowImpl { +class WindowImpl : public MessageMapInterface { public: WindowImpl(); virtual ~WindowImpl(); - BEGIN_MSG_MAP_EX(WindowImpl) - // No messages to handle - END_MSG_MAP() - - // Initialize the Window with a parent and an initial desired size. - virtual void Init(HWND parent, const gfx::Rect& bounds); - - // Returns the gfx::NativeView associated with this Window. - virtual gfx::NativeView GetNativeView() const; + // Initializes the Window with a parent and an initial desired size. + void Init(HWND parent, const gfx::Rect& bounds); // Retrieves the default window icon to use for windows if none is specified. virtual HICON GetDefaultWindowIcon() const; + // Returns the HWND associated with this Window. + HWND hwnd() const { return hwnd_; } + // Sets the window styles. This is ONLY used when the window is created. // In other words, if you invoke this after invoking Init, nothing happens. void set_window_style(DWORD style) { window_style_ = style; } @@ -62,16 +71,13 @@ class WindowImpl { UINT initial_class_style() { return class_style_; } protected: - // Call close instead of this to Destroy the window. - BOOL DestroyWindow(); - // Handles the WndProc callback for this object. virtual LRESULT OnWndProc(UINT message, WPARAM w_param, LPARAM l_param); private: friend class ClassRegistrar; - // The windows procedure used by all Windows. + // The window procedure used by all Windows. static LRESULT CALLBACK WndProc(HWND window, UINT message, WPARAM w_param, |