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

Unified Diff: base/win/message_window.h

Issue 16780006: Moved remoting::win::MessageWindow to base::win::MessageWindow so that it could be re-used outside … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - 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 | « base/base.gypi ('k') | 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/remoting/host/win/message_window.h b/base/win/message_window.h
similarity index 63%
rename from remoting/host/win/message_window.h
rename to base/win/message_window.h
index ecd2a36276b597b6aa6dadc19da6cba9fecdcbcb..ba4b0b36354f122ac7a60ab218f6398bea43dee9 100644
--- a/remoting/host/win/message_window.h
+++ b/base/win/message_window.h
@@ -2,25 +2,24 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef REMOTING_HOST_WIN_MESSAGE_WINDOW_H_
-#define REMOTING_HOST_WIN_MESSAGE_WINDOW_H_
+#ifndef BASE_WIN_MESSAGE_WINDOW_H_
+#define BASE_WIN_MESSAGE_WINDOW_H_
#include <windows.h>
-#include <string>
-
+#include "base/base_export.h"
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/threading/non_thread_safe.h"
-namespace remoting {
+namespace base {
namespace win {
// Implements a message-only window.
-class MessageWindow : base::NonThreadSafe {
+class BASE_EXPORT MessageWindow : public base::NonThreadSafe {
public:
// Handles incoming window messages.
- class Delegate {
+ class BASE_EXPORT Delegate {
public:
virtual ~Delegate() {}
@@ -32,12 +31,12 @@ class MessageWindow : base::NonThreadSafe {
};
MessageWindow();
- MessageWindow(const std::string& class_name, HINSTANCE instance);
~MessageWindow();
- // Registers the window class and creates the window. The incoming messages
- // will be handled by |delegate|. |delegate| must outlive |this|.
- bool Create(Delegate* delegate);
+ // Creates a message-only window. The incoming messages will be handled by
+ // |delegate|. |delegate| must outlive |this|. |window_name| is optional and
+ // can be NULL.
+ bool Create(Delegate* delegate, const wchar_t* window_name);
HWND hwnd() const { return window_; }
@@ -49,12 +48,6 @@ class MessageWindow : base::NonThreadSafe {
// Atom representing the registered window class.
ATOM atom_;
- // MessageWindow class name.
- std::string class_name_;
-
- // Instance of the module containing the window procedure.
- HINSTANCE instance_;
-
// Handle of the input window.
HWND window_;
@@ -62,6 +55,6 @@ class MessageWindow : base::NonThreadSafe {
};
} // namespace win
-} // namespace remoting
+} // namespace base
-#endif // REMOTING_HOST_WIN_MESSAGE_WINDOW_H_
+#endif // BASE_WIN_MESSAGE_WINDOW_H_
« no previous file with comments | « base/base.gypi ('k') | base/win/message_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698