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

Unified Diff: base/window_impl.cc

Issue 164543: Reverting 23406. (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 | « base/window_impl.h ('k') | chrome/browser/views/tab_contents/tab_contents_view_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/window_impl.cc
===================================================================
--- base/window_impl.cc (revision 23410)
+++ base/window_impl.cc (working copy)
@@ -96,7 +96,7 @@
typedef std::list<RegisteredClass> RegisteredClasses;
RegisteredClasses registered_classes_;
- // Counter of how many classes have been registered so far.
+ // Counter of how many classes have ben registered so far.
int registered_count_;
DISALLOW_COPY_AND_ASSIGN(ClassRegistrar);
@@ -136,7 +136,7 @@
height = bounds.height();
}
- hwnd_ = CreateWindowEx(window_ex_style_, GetWindowClassName().c_str(), NULL,
+ hwnd_ = CreateWindowEx(window_ex_style_, GetWindowClassName().c_str(), L"",
window_style_, x, y, width, height,
parent, NULL, NULL, this);
DCHECK(hwnd_);
@@ -145,17 +145,27 @@
DCHECK(win_util::GetWindowUserData(hwnd_) == this);
}
+gfx::NativeView WindowImpl::GetNativeView() const {
+ return hwnd_;
+}
+
HICON WindowImpl::GetDefaultWindowIcon() const {
return NULL;
}
+BOOL WindowImpl::DestroyWindow() {
+ DCHECK(::IsWindow(GetNativeView()));
+ return ::DestroyWindow(GetNativeView());
+}
+
LRESULT WindowImpl::OnWndProc(UINT message, WPARAM w_param, LPARAM l_param) {
+ HWND window = GetNativeView();
LRESULT result = 0;
// Handle the message if it's in our message map; otherwise, let the system
// handle it.
- if (!ProcessWindowMessage(hwnd_, message, w_param, l_param, result))
- result = DefWindowProc(hwnd_, message, w_param, l_param);
+ if (!ProcessWindowMessage(window, message, w_param, l_param, result))
+ result = DefWindowProc(window, message, w_param, l_param);
return result;
}
« no previous file with comments | « base/window_impl.h ('k') | chrome/browser/views/tab_contents/tab_contents_view_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698