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

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

Issue 2802703004: Log creation for many dialog box types. (Closed)
Patch Set: Enums better match class names. Created 3 years, 8 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 unified diff | Download patch
OLDNEW
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/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
11 #include "build/build_config.h" 11 #include "build/build_config.h"
12 #include "chrome/browser/platform_util.h" 12 #include "chrome/browser/platform_util.h"
13 #include "chrome/browser/ui/browser_dialogs.h"
13 #include "chrome/browser/ui/browser_finder.h" 14 #include "chrome/browser/ui/browser_finder.h"
14 #include "chrome/browser/ui/chrome_web_modal_dialog_manager_delegate.h" 15 #include "chrome/browser/ui/chrome_web_modal_dialog_manager_delegate.h"
15 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" 16 #include "chrome/browser/ui/tab_contents/core_tab_helper.h"
16 #include "chrome/browser/ui/tab_contents/tab_contents_iterator.h" 17 #include "chrome/browser/ui/tab_contents/tab_contents_iterator.h"
17 #include "chrome/browser/ui/views/harmony/chrome_layout_provider.h" 18 #include "chrome/browser/ui/views/harmony/chrome_layout_provider.h"
18 #include "chrome/common/chrome_constants.h" 19 #include "chrome/common/chrome_constants.h"
19 #include "chrome/common/crash_keys.h" 20 #include "chrome/common/crash_keys.h"
20 #include "chrome/common/logging_chrome.h" 21 #include "chrome/common/logging_chrome.h"
21 #include "chrome/grit/generated_resources.h" 22 #include "chrome/grit/generated_resources.h"
22 #include "chrome/grit/theme_resources.h" 23 #include "chrome/grit/theme_resources.h"
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 // static 224 // static
224 bool HungRendererDialogView::IsFrameActive(WebContents* contents) { 225 bool HungRendererDialogView::IsFrameActive(WebContents* contents) {
225 gfx::NativeWindow window = 226 gfx::NativeWindow window =
226 platform_util::GetTopLevel(contents->GetNativeView()); 227 platform_util::GetTopLevel(contents->GetNativeView());
227 return platform_util::IsWindowActive(window); 228 return platform_util::IsWindowActive(window);
228 } 229 }
229 230
230 HungRendererDialogView::HungRendererDialogView() 231 HungRendererDialogView::HungRendererDialogView()
231 : info_label_(nullptr), hung_pages_table_(nullptr), initialized_(false) { 232 : info_label_(nullptr), hung_pages_table_(nullptr), initialized_(false) {
232 InitClass(); 233 InitClass();
234 chrome::RecordDialogCreation(chrome::DialogIdentifier::HUNG_RENDERER);
233 } 235 }
234 236
235 HungRendererDialogView::~HungRendererDialogView() { 237 HungRendererDialogView::~HungRendererDialogView() {
236 hung_pages_table_->SetModel(NULL); 238 hung_pages_table_->SetModel(NULL);
237 } 239 }
238 240
239 void HungRendererDialogView::ShowForWebContents( 241 void HungRendererDialogView::ShowForWebContents(
240 WebContents* contents, 242 WebContents* contents,
241 const content::WebContentsUnresponsiveState& unresponsive_state) { 243 const content::WebContentsUnresponsiveState& unresponsive_state) {
242 DCHECK(contents && GetWidget()); 244 DCHECK(contents && GetWidget());
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 457
456 // static 458 // static
457 void HungRendererDialogView::InitClass() { 459 void HungRendererDialogView::InitClass() {
458 static bool initialized = false; 460 static bool initialized = false;
459 if (!initialized) { 461 if (!initialized) {
460 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 462 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
461 frozen_icon_ = rb.GetImageSkiaNamed(IDR_FROZEN_TAB_ICON); 463 frozen_icon_ = rb.GetImageSkiaNamed(IDR_FROZEN_TAB_ICON);
462 initialized = true; 464 initialized = true;
463 } 465 }
464 } 466 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/first_run_bubble.cc ('k') | chrome/browser/ui/views/ime/ime_warning_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698