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

Unified Diff: base/window_impl.h

Issue 165469: Change PluginInstallImpl to use base::WindowImpl instead of CWindowImpl to re... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/window_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/window_impl.h
===================================================================
--- base/window_impl.h (revision 23329)
+++ base/window_impl.h (working copy)
@@ -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 @@
// Windows.
//
///////////////////////////////////////////////////////////////////////////////
-class WindowImpl {
+class WindowImpl : public MessageMapInterface {
public:
WindowImpl();
virtual ~WindowImpl();
- BEGIN_MSG_MAP_EX(WindowImpl)
- // No messages to handle
- END_MSG_MAP()
+ // Initializes the Window with a parent and an initial desired size.
+ void Init(HWND parent, const gfx::Rect& bounds);
- // 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;
-
// 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 @@
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,
« no previous file with comments | « no previous file | base/window_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698