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

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 1815623004: Remove Hung plugin detector (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_windowed_plugins
Patch Set: fix compile Created 4 years, 9 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 | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/browser_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 63487ffc7938c4430674967b7a498ba590a17496..6f229821947281438f1bcdacb48e06349525d12b 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -463,11 +463,6 @@ BrowserView::BrowserView()
initialized_(false),
handling_theme_changed_(false),
in_process_fullscreen_(false),
-#if defined(OS_WIN)
- // TODO(piman): is this still useful now that windowed plugins are gone?
- ticker_(0),
- hung_window_detector_(&hung_plugin_action_),
-#endif
force_location_bar_focus_(false),
activate_modal_dialog_factory_(this) {
}
@@ -483,10 +478,6 @@ BrowserView::~BrowserView() {
browser_->tab_strip_model()->RemoveObserver(this);
#if defined(OS_WIN)
- // Stop hung plugin monitoring.
- ticker_.Stop();
- ticker_.UnregisterTickHandler(&hung_window_detector_);
-
// Terminate the jumplist (must be called before browser_->profile() is
// destroyed.
if (jumplist_.get()) {
@@ -2071,13 +2062,6 @@ void BrowserView::InitViews() {
GetWidget()->SetNativeWindowProperty(Profile::kProfileKey,
browser_->profile());
- // Start a hung plugin window detector for this browser object (as long as
- // hang detection is not disabled).
- if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisableHangMonitor)) {
- InitHangMonitor();
- }
-
LoadAccelerators();
contents_web_view_ = new ContentsWebView(browser_->profile());
@@ -2461,33 +2445,6 @@ int BrowserView::GetCommandIDForAppCommandID(int app_command_id) const {
#endif
}
-void BrowserView::InitHangMonitor() {
-#if defined(OS_WIN)
- PrefService* pref_service = g_browser_process->local_state();
- if (!pref_service)
- return;
-
- int plugin_message_response_timeout =
- pref_service->GetInteger(prefs::kPluginMessageResponseTimeout);
- int hung_plugin_detect_freq =
- pref_service->GetInteger(prefs::kHungPluginDetectFrequency);
- HWND window = GetWidget()->GetNativeView()->GetHost()->
- GetAcceleratedWidget();
- if ((hung_plugin_detect_freq > 0) &&
- hung_window_detector_.Initialize(window,
- plugin_message_response_timeout)) {
- ticker_.set_tick_interval(hung_plugin_detect_freq);
- ticker_.RegisterTickHandler(&hung_window_detector_);
- ticker_.Start();
-
- pref_service->SetInteger(prefs::kPluginMessageResponseTimeout,
- plugin_message_response_timeout);
- pref_service->SetInteger(prefs::kHungPluginDetectFrequency,
- hung_plugin_detect_freq);
- }
-#endif
-}
-
void BrowserView::UpdateAcceleratorMetrics(const ui::Accelerator& accelerator,
int command_id) {
const ui::KeyboardCode key_code = accelerator.key_code();
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698