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

Unified Diff: base/win/message_window.h

Issue 17615003: ProcessSingleton now uses base::win::MessageWindow to create a message-only window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR feedback. Created 7 years, 6 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/win/message_window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win/message_window.h
diff --git a/base/win/message_window.h b/base/win/message_window.h
index 4fd507488f299b06b1719b4e6c73a5b88d3853d9..d255eec6f6cad3c6ea76a78153646da78c5079d6 100644
--- a/base/win/message_window.h
+++ b/base/win/message_window.h
@@ -20,6 +20,9 @@ namespace win {
// Implements a message-only window.
class BASE_EXPORT MessageWindow : public base::NonThreadSafe {
public:
+ // Used to register a process-wide message window class.
+ class WindowClass;
+
// Implement this callback to handle messages received by the message window.
// If the callback returns |false|, the first four parameters are passed to
// DefWindowProc(). Otherwise, |*result| is returned by the window procedure.
@@ -41,7 +44,14 @@ class BASE_EXPORT MessageWindow : public base::NonThreadSafe {
HWND hwnd() const { return window_; }
+ // Retrieves a handle of the first message-only window with matching
+ // |windows_name|.
+ static HWND FindWindow(const string16& window_name);
+
private:
+ // Give |WindowClass| access to WindowProc().
+ friend class WindowClass;
+
// Contains the actual window creation code.
bool DoCreate(const MessageCallback& message_callback,
const wchar_t* window_name);
@@ -50,9 +60,6 @@ class BASE_EXPORT MessageWindow : public base::NonThreadSafe {
static LRESULT CALLBACK WindowProc(HWND hwnd, UINT message, WPARAM wparam,
LPARAM lparam);
- // Atom representing the registered window class.
- ATOM atom_;
-
// Invoked to handle messages received by the window.
MessageCallback message_callback_;
« no previous file with comments | « no previous file | base/win/message_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698