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_ |