summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/plugin_process_host.cc3
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_win.cc2
-rw-r--r--chrome/views/native_control.cc24
-rw-r--r--chrome/views/text_field.cc13
-rw-r--r--chrome/views/widget_win.cc3
5 files changed, 9 insertions, 36 deletions
diff --git a/chrome/browser/plugin_process_host.cc b/chrome/browser/plugin_process_host.cc
index feab679..0e06e3e 100644
--- a/chrome/browser/plugin_process_host.cc
+++ b/chrome/browser/plugin_process_host.cc
@@ -14,7 +14,6 @@
#include "base/path_service.h"
#include "base/process_util.h"
#include "base/thread.h"
-#include "base/win_util.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_plugin_browsing_context.h"
#include "chrome/browser/chrome_thread.h"
@@ -352,7 +351,6 @@ class CreateWindowTask : public Task {
MAKEINTATOM(window_class), 0,
WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS,
0, 0, 0, 0, parent_, 0, GetModuleHandle(NULL), 0);
- TRACK_HWND_CREATION(window);
PluginProcessHostMsg_CreateWindow::WriteReplyParams(
reply_msg_, window);
@@ -374,7 +372,6 @@ class DestroyWindowTask : public Task {
virtual void Run() {
DestroyWindow(window_);
- TRACK_HWND_DESTRUCTION(window_);
}
private:
diff --git a/chrome/browser/renderer_host/render_widget_host_view_win.cc b/chrome/browser/renderer_host/render_widget_host_view_win.cc
index f4c27dd..2c19e7e 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_win.cc
+++ b/chrome/browser/renderer_host/render_widget_host_view_win.cc
@@ -396,7 +396,6 @@ LRESULT RenderWidgetHostViewWin::OnCreate(CREATESTRUCT* create_struct) {
// Call the WM_INPUTLANGCHANGE message handler to initialize the input locale
// of a browser process.
OnInputLangChange(0, 0);
- TRACK_HWND_CREATION(m_hWnd);
return 0;
}
@@ -414,7 +413,6 @@ void RenderWidgetHostViewWin::OnActivate(UINT action, BOOL minimized,
void RenderWidgetHostViewWin::OnDestroy() {
ResetTooltip();
TrackMouseLeave(false);
- TRACK_HWND_DESTRUCTION(m_hWnd);
}
void RenderWidgetHostViewWin::OnPaint(HDC dc) {
diff --git a/chrome/views/native_control.cc b/chrome/views/native_control.cc
index 1490f27..3c0e8d0 100644
--- a/chrome/views/native_control.cc
+++ b/chrome/views/native_control.cc
@@ -79,20 +79,16 @@ class NativeControlContainer : public CWindowImpl<NativeControlContainer,
private:
LRESULT OnCreate(LPCREATESTRUCT create_struct) {
- TRACK_HWND_CREATION(m_hWnd);
-
control_ = parent_->CreateNativeControl(m_hWnd);
- TRACK_HWND_CREATION(control_);
-
FocusManager::InstallFocusSubclass(control_, parent_);
-
- // We subclass the control hwnd so we get the WM_KEYDOWN messages.
- WNDPROC original_handler =
- win_util::SetWindowProc(control_,
- &NativeControl::NativeControlWndProc);
- SetProp(control_, kHandlerKey, original_handler);
- SetProp(control_, kNativeControlKey , parent_);
-
+ if (parent_->NotifyOnKeyDown()) {
+ // We subclass the control hwnd so we get the WM_KEYDOWN messages.
+ WNDPROC original_handler =
+ win_util::SetWindowProc(control_,
+ &NativeControl::NativeControlWndProc);
+ SetProp(control_, kHandlerKey, original_handler);
+ SetProp(control_, kNativeControlKey , parent_);
+ }
::ShowWindow(control_, SW_SHOW);
return 1;
}
@@ -125,7 +121,6 @@ class NativeControlContainer : public CWindowImpl<NativeControlContainer,
void OnDestroy() {
if (parent_)
parent_->OnDestroy();
- TRACK_HWND_DESTRUCTION(m_hWnd);
}
void OnContextMenu(HWND window, const CPoint& location) {
@@ -368,7 +363,7 @@ LRESULT CALLBACK NativeControl::NativeControlWndProc(HWND window, UINT message,
static_cast<NativeControl*>(GetProp(window, kNativeControlKey));
DCHECK(native_control);
- if (message == WM_KEYDOWN && native_control->NotifyOnKeyDown()) {
+ if (message == WM_KEYDOWN) {
if (native_control->OnKeyDown(static_cast<int>(w_param)))
return 0;
} else if (message == WM_DESTROY) {
@@ -376,7 +371,6 @@ LRESULT CALLBACK NativeControl::NativeControlWndProc(HWND window, UINT message,
reinterpret_cast<WNDPROC>(original_handler));
RemoveProp(window, kHandlerKey);
RemoveProp(window, kNativeControlKey);
- TRACK_HWND_DESTRUCTION(window);
}
return CallWindowProc(reinterpret_cast<WNDPROC>(original_handler), window,
diff --git a/chrome/views/text_field.cc b/chrome/views/text_field.cc
index 7c4e2fd..79ee7b9 100644
--- a/chrome/views/text_field.cc
+++ b/chrome/views/text_field.cc
@@ -70,9 +70,7 @@ class TextField::Edit
MSG_WM_CHAR(OnChar)
MSG_WM_CONTEXTMENU(OnContextMenu)
MSG_WM_COPY(OnCopy)
- MSG_WM_CREATE(OnCreate)
MSG_WM_CUT(OnCut)
- MSG_WM_DESTROY(OnDestroy)
MESSAGE_HANDLER_EX(WM_IME_STARTCOMPOSITION, OnImeStartComposition)
MESSAGE_HANDLER_EX(WM_IME_COMPOSITION, OnImeComposition)
MSG_WM_KEYDOWN(OnKeyDown)
@@ -118,9 +116,7 @@ class TextField::Edit
void OnChar(TCHAR key, UINT repeat_count, UINT flags);
void OnContextMenu(HWND window, const CPoint& point);
void OnCopy();
- LRESULT OnCreate(CREATESTRUCT* create_struct);
void OnCut();
- void OnDestroy();
LRESULT OnImeStartComposition(UINT message, WPARAM wparam, LPARAM lparam);
LRESULT OnImeComposition(UINT message, WPARAM wparam, LPARAM lparam);
void OnKeyDown(TCHAR key, UINT repeat_count, UINT flags);
@@ -418,11 +414,6 @@ void TextField::Edit::OnCopy() {
}
}
-LRESULT TextField::Edit::OnCreate(CREATESTRUCT* create_struct) {
- TRACK_HWND_CREATION(m_hWnd);
- return 0;
-}
-
void TextField::Edit::OnCut() {
if (parent_->IsReadOnly())
return;
@@ -434,10 +425,6 @@ void TextField::Edit::OnCut() {
ReplaceSel(L"", true);
}
-void TextField::Edit::OnDestroy() {
- TRACK_HWND_DESTRUCTION(m_hWnd);
-}
-
LRESULT TextField::Edit::OnImeStartComposition(UINT message,
WPARAM wparam,
LPARAM lparam) {
diff --git a/chrome/views/widget_win.cc b/chrome/views/widget_win.cc
index 5e60e38..7268a59 100644
--- a/chrome/views/widget_win.cc
+++ b/chrome/views/widget_win.cc
@@ -162,8 +162,6 @@ void WidgetWin::Init(HWND parent, const gfx::Rect& bounds,
window_style_, bounds.x(), bounds.y(), bounds.width(),
bounds.height(), parent, NULL, NULL, this);
DCHECK(hwnd_);
- TRACK_HWND_CREATION(hwnd_);
-
// The window procedure should have set the data for us.
DCHECK(win_util::GetWindowUserData(hwnd_) == this);
@@ -934,7 +932,6 @@ LRESULT CALLBACK WidgetWin::WndProc(HWND window, UINT message,
if (!widget->ProcessWindowMessage(window, message, w_param, l_param, result))
result = DefWindowProc(window, message, w_param, l_param);
if (message == WM_NCDESTROY) {
- TRACK_HWND_DESTRUCTION(window);
widget->hwnd_ = NULL;
widget->OnFinalMessage(window);
}