OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/views/hung_renderer_view.h" | 5 #include "chrome/browser/ui/views/hung_renderer_view.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/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/favicon/favicon_tab_helper.h" | 10 #include "chrome/browser/favicon/favicon_tab_helper.h" |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 hung_pages_table_model_->GetRenderViewHost()->RestartHangMonitorTimeout(); | 344 hung_pages_table_model_->GetRenderViewHost()->RestartHangMonitorTimeout(); |
345 return true; | 345 return true; |
346 } | 346 } |
347 | 347 |
348 | 348 |
349 bool HungRendererDialogView::UseNewStyleForThisDialog() const { | 349 bool HungRendererDialogView::UseNewStyleForThisDialog() const { |
350 #if defined(OS_WIN) | 350 #if defined(OS_WIN) |
351 // Use the old dialog style without Aero glass, otherwise the dialog will be | 351 // Use the old dialog style without Aero glass, otherwise the dialog will be |
352 // visually constrained to browser window bounds. See http://crbug.com/323278 | 352 // visually constrained to browser window bounds. See http://crbug.com/323278 |
353 return ui::win::IsAeroGlassEnabled(); | 353 return ui::win::IsAeroGlassEnabled(); |
| 354 #else |
| 355 return views::DialogDelegateView::UseNewStyleForThisDialog(); |
354 #endif | 356 #endif |
355 return views::DialogDelegateView::UseNewStyleForThisDialog(); | |
356 } | 357 } |
357 | 358 |
358 /////////////////////////////////////////////////////////////////////////////// | 359 /////////////////////////////////////////////////////////////////////////////// |
359 // HungRendererDialogView, views::ButtonListener implementation: | 360 // HungRendererDialogView, views::ButtonListener implementation: |
360 | 361 |
361 void HungRendererDialogView::ButtonPressed( | 362 void HungRendererDialogView::ButtonPressed( |
362 views::Button* sender, const ui::Event& event) { | 363 views::Button* sender, const ui::Event& event) { |
363 if (sender == kill_button_ && | 364 if (sender == kill_button_ && |
364 hung_pages_table_model_->GetRenderProcessHost()) { | 365 hung_pages_table_model_->GetRenderProcessHost()) { |
365 | 366 |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 } | 469 } |
469 | 470 |
470 void HideHungRendererDialog(WebContents* contents) { | 471 void HideHungRendererDialog(WebContents* contents) { |
471 if (!logging::DialogsAreSuppressed() && | 472 if (!logging::DialogsAreSuppressed() && |
472 !PlatformHideCustomHungRendererDialog(contents) && | 473 !PlatformHideCustomHungRendererDialog(contents) && |
473 HungRendererDialogView::GetInstance()) | 474 HungRendererDialogView::GetInstance()) |
474 HungRendererDialogView::GetInstance()->EndForWebContents(contents); | 475 HungRendererDialogView::GetInstance()->EndForWebContents(contents); |
475 } | 476 } |
476 | 477 |
477 } // namespace chrome | 478 } // namespace chrome |
OLD | NEW |