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

Side by Side Diff: chrome/browser/ui/views/hung_renderer_view.cc

Issue 8477019: Adds Window::MoveChildToFront, with surrounding changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chromeos/options/network_config_view.cc ('k') | ui/aura/window.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/ui/browser_dialogs.h" 5 #include "chrome/browser/ui/browser_dialogs.h"
6 6
7 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "base/memory/scoped_vector.h" 8 #include "base/memory/scoped_vector.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/favicon/favicon_tab_helper.h" 10 #include "chrome/browser/favicon/favicon_tab_helper.h"
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 HWND foreground_window = GetForegroundWindow(); 329 HWND foreground_window = GetForegroundWindow();
330 if (foreground_window != frame_hwnd && 330 if (foreground_window != frame_hwnd &&
331 foreground_window != GetWidget()->GetNativeWindow()) { 331 foreground_window != GetWidget()->GetNativeWindow()) {
332 return; 332 return;
333 } 333 }
334 334
335 if (!GetWidget()->IsActive()) { 335 if (!GetWidget()->IsActive()) {
336 gfx::Rect bounds = GetDisplayBounds(contents); 336 gfx::Rect bounds = GetDisplayBounds(contents);
337 views::Widget* insert_after = 337 views::Widget* insert_after =
338 views::Widget::GetWidgetForNativeView(frame_hwnd); 338 views::Widget::GetWidgetForNativeView(frame_hwnd);
339 GetWidget()->SetBoundsConstrained(bounds, insert_after); 339 GetWidget()->SetBoundsConstrained(bounds);
340 if (insert_after) 340 if (insert_after)
341 GetWidget()->MoveAboveWidget(insert_after); 341 GetWidget()->MoveAboveWidget(insert_after);
342 342
343 // We only do this if the window isn't active (i.e. hasn't been shown yet, 343 // We only do this if the window isn't active (i.e. hasn't been shown yet,
344 // or is currently shown but deactivated for another TabContents). This is 344 // or is currently shown but deactivated for another TabContents). This is
345 // because this window is a singleton, and it's possible another active 345 // because this window is a singleton, and it's possible another active
346 // renderer may hang while this one is showing, and we don't want to reset 346 // renderer may hang while this one is showing, and we don't want to reset
347 // the list of hung pages for a potentially unrelated renderer while this 347 // the list of hung pages for a potentially unrelated renderer while this
348 // one is showing. 348 // one is showing.
349 hung_pages_table_model_->InitForTabContents(contents); 349 hung_pages_table_model_->InitForTabContents(contents);
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 g_instance->ShowForTabContents(contents); 558 g_instance->ShowForTabContents(contents);
559 } 559 }
560 } 560 }
561 561
562 void HideNativeHungRendererDialog(TabContents* contents) { 562 void HideNativeHungRendererDialog(TabContents* contents) {
563 if (!logging::DialogsAreSuppressed() && g_instance) 563 if (!logging::DialogsAreSuppressed() && g_instance)
564 g_instance->EndForTabContents(contents); 564 g_instance->EndForTabContents(contents);
565 } 565 }
566 566
567 } // namespace browser 567 } // namespace browser
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/options/network_config_view.cc ('k') | ui/aura/window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698