OLD | NEW |
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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 foreground_window != GetWidget()->GetNativeWindow()) { | 332 foreground_window != GetWidget()->GetNativeWindow()) { |
333 return; | 333 return; |
334 } | 334 } |
335 | 335 |
336 if (!GetWidget()->IsActive()) { | 336 if (!GetWidget()->IsActive()) { |
337 gfx::Rect bounds = GetDisplayBounds(contents); | 337 gfx::Rect bounds = GetDisplayBounds(contents); |
338 views::Widget* insert_after = | 338 views::Widget* insert_after = |
339 views::Widget::GetWidgetForNativeView(frame_hwnd); | 339 views::Widget::GetWidgetForNativeView(frame_hwnd); |
340 GetWidget()->SetBoundsConstrained(bounds); | 340 GetWidget()->SetBoundsConstrained(bounds); |
341 if (insert_after) | 341 if (insert_after) |
342 GetWidget()->MoveAboveWidget(insert_after); | 342 GetWidget()->StackAboveWidget(insert_after); |
343 | 343 |
344 // We only do this if the window isn't active (i.e. hasn't been shown yet, | 344 // We only do this if the window isn't active (i.e. hasn't been shown yet, |
345 // or is currently shown but deactivated for another TabContents). This is | 345 // or is currently shown but deactivated for another TabContents). This is |
346 // because this window is a singleton, and it's possible another active | 346 // because this window is a singleton, and it's possible another active |
347 // renderer may hang while this one is showing, and we don't want to reset | 347 // renderer may hang while this one is showing, and we don't want to reset |
348 // the list of hung pages for a potentially unrelated renderer while this | 348 // the list of hung pages for a potentially unrelated renderer while this |
349 // one is showing. | 349 // one is showing. |
350 hung_pages_table_model_->InitForTabContents(contents); | 350 hung_pages_table_model_->InitForTabContents(contents); |
351 GetWidget()->Show(); | 351 GetWidget()->Show(); |
352 } | 352 } |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 g_instance->ShowForTabContents(contents); | 559 g_instance->ShowForTabContents(contents); |
560 } | 560 } |
561 } | 561 } |
562 | 562 |
563 void HideNativeHungRendererDialog(TabContents* contents) { | 563 void HideNativeHungRendererDialog(TabContents* contents) { |
564 if (!logging::DialogsAreSuppressed() && g_instance) | 564 if (!logging::DialogsAreSuppressed() && g_instance) |
565 g_instance->EndForTabContents(contents); | 565 g_instance->EndForTabContents(contents); |
566 } | 566 } |
567 | 567 |
568 } // namespace browser | 568 } // namespace browser |
OLD | NEW |