OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "remoting/host/win/message_window.h" | 5 #include "base/win/message_window.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/process_util.h" | 8 #include "base/process_util.h" |
9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
11 #include "base/win/wrapped_window_proc.h" | 11 #include "base/win/wrapped_window_proc.h" |
12 | 12 |
13 const char kClassNameFormat[] = "Chromoting_MessageWindow_%p"; | 13 const char kClassNameFormat[] = "Chrome_MessageWindow_%p"; |
14 | 14 |
15 namespace remoting { | 15 namespace base { |
16 namespace win { | 16 namespace win { |
17 | 17 |
18 MessageWindow::MessageWindow() | 18 MessageWindow::MessageWindow() |
19 : atom_(0), | 19 : atom_(0), |
20 instance_(NULL), | 20 instance_(NULL), |
21 window_(NULL) { | 21 window_(NULL) { |
22 class_name_ = base::StringPrintf(kClassNameFormat, this); | 22 class_name_ = base::StringPrintf(kClassNameFormat, this); |
darin (slow to review)
2013/05/23 00:07:14
can't the address of this be reused? hence my sug
alexeypa (please no reviews)
2013/05/23 17:45:54
The window class is unregistered in the MessageWin
| |
23 instance_ = base::GetModuleFromAddress(static_cast<WNDPROC>( | 23 instance_ = base::GetModuleFromAddress(static_cast<WNDPROC>( |
24 &base::win::WrappedWindowProc<WindowProc>)); | 24 &base::win::WrappedWindowProc<WindowProc>)); |
25 } | 25 } |
26 | 26 |
27 MessageWindow::MessageWindow(const std::string& class_name, HINSTANCE instance) | 27 MessageWindow::MessageWindow(const std::string& class_name, HINSTANCE instance) |
28 : atom_(0), | 28 : atom_(0), |
29 class_name_(class_name), | 29 class_name_(class_name), |
30 instance_(instance), | 30 instance_(instance), |
31 window_(NULL) { | 31 window_(NULL) { |
32 } | 32 } |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
108 if (delegate) { | 108 if (delegate) { |
109 LRESULT message_result; | 109 LRESULT message_result; |
110 if (delegate->HandleMessage(hwnd, message, wparam, lparam, &message_result)) | 110 if (delegate->HandleMessage(hwnd, message, wparam, lparam, &message_result)) |
111 return message_result; | 111 return message_result; |
112 } | 112 } |
113 | 113 |
114 return DefWindowProc(hwnd, message, wparam, lparam); | 114 return DefWindowProc(hwnd, message, wparam, lparam); |
115 } | 115 } |
116 | 116 |
117 } // namespace win | 117 } // namespace win |
118 } // namespace remoting | 118 } // namespace base |
OLD | NEW |