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

Unified Diff: content/browser/renderer_host/render_widget_host_view_win.cc

Issue 10753017: In Windows 8 chrome metro mode if we Alt tabbed away from chrome while a tab was loading, we would … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 | « content/browser/renderer_host/render_widget_host_view_win.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_win.cc
===================================================================
--- content/browser/renderer_host/render_widget_host_view_win.cc (revision 145702)
+++ content/browser/renderer_host/render_widget_host_view_win.cc (working copy)
@@ -587,7 +587,6 @@
tooltip_hwnd_(NULL),
tooltip_showing_(false),
weak_factory_(this),
- parent_hwnd_(NULL),
is_loading_(false),
text_input_type_(ui::TEXT_INPUT_TYPE_NONE),
is_fullscreen_(false),
@@ -640,7 +639,6 @@
void RenderWidgetHostViewWin::InitAsChild(
gfx::NativeView parent_view) {
- parent_hwnd_ = parent_view;
CreateWnd(parent_view);
}
@@ -939,20 +937,14 @@
}
void RenderWidgetHostViewWin::Show() {
- if (!is_fullscreen_) {
- DCHECK(parent_hwnd_);
- DCHECK(parent_hwnd_ != ui::GetWindowToParentTo(true));
- SetParent(parent_hwnd_);
- }
ShowWindow(SW_SHOW);
-
WasRestored();
}
void RenderWidgetHostViewWin::Hide() {
if (!is_fullscreen_ && GetParent() == ui::GetWindowToParentTo(true)) {
- LOG(WARNING) << "Hide() called twice in a row: " << this << ":" <<
- parent_hwnd_ << ":" << GetParent();
+ LOG(WARNING) << "Hide() called twice in a row: " << this << ":"
+ << GetParent();
return;
}
@@ -960,13 +952,6 @@
::SetFocus(NULL);
ShowWindow(SW_HIDE);
- if (!is_fullscreen_) {
- // Cache the old parent, then orphan the window so we stop receiving
- // messages.
- parent_hwnd_ = GetParent();
- SetParent(NULL);
- }
-
WasHidden();
}
@@ -1953,11 +1938,10 @@
if (close_on_deactivate_ &&
(((message == WM_KEYDOWN || message == WM_KEYUP) && (wparam == VK_TAB)) ||
(message == WM_CHAR && wparam == L'\t'))) {
- DCHECK(parent_hwnd_);
// First close the pop-up.
SendMessage(WM_CANCELMODE);
// Then move the focus by forwarding the tab key to the parent.
- return ::SendMessage(parent_hwnd_, message, wparam, lparam);
+ return ::SendMessage(GetParent(), message, wparam, lparam);
}
if (!render_widget_host_)
@@ -2970,8 +2954,7 @@
void RenderWidgetHostViewWin::DoPopupOrFullscreenInit(HWND parent_hwnd,
const gfx::Rect& pos,
DWORD ex_style) {
- parent_hwnd_ = parent_hwnd;
- Create(parent_hwnd_, NULL, NULL, WS_POPUP, ex_style);
+ Create(parent_hwnd, NULL, NULL, WS_POPUP, ex_style);
MoveWindow(pos.x(), pos.y(), pos.width(), pos.height(), TRUE);
ShowWindow(IsActivatable() ? SW_SHOW : SW_SHOWNA);
}
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698