| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/frame/browser_view.h" | 5 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 2316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2327 #if defined(OS_WIN) | 2327 #if defined(OS_WIN) |
| 2328 PrefService* pref_service = g_browser_process->local_state(); | 2328 PrefService* pref_service = g_browser_process->local_state(); |
| 2329 if (!pref_service) | 2329 if (!pref_service) |
| 2330 return; | 2330 return; |
| 2331 | 2331 |
| 2332 int plugin_message_response_timeout = | 2332 int plugin_message_response_timeout = |
| 2333 pref_service->GetInteger(prefs::kPluginMessageResponseTimeout); | 2333 pref_service->GetInteger(prefs::kPluginMessageResponseTimeout); |
| 2334 int hung_plugin_detect_freq = | 2334 int hung_plugin_detect_freq = |
| 2335 pref_service->GetInteger(prefs::kHungPluginDetectFrequency); | 2335 pref_service->GetInteger(prefs::kHungPluginDetectFrequency); |
| 2336 #if defined(USE_AURA) | 2336 #if defined(USE_AURA) |
| 2337 HWND window = GetWidget()->GetNativeView()->GetDispatcher()->host()-> | 2337 HWND window = GetWidget()->GetNativeView()->GetHost()-> |
| 2338 GetAcceleratedWidget(); | 2338 GetAcceleratedWidget(); |
| 2339 #else | 2339 #else |
| 2340 HWND window = GetWidget()->GetNativeView(); | 2340 HWND window = GetWidget()->GetNativeView(); |
| 2341 #endif | 2341 #endif |
| 2342 if ((hung_plugin_detect_freq > 0) && | 2342 if ((hung_plugin_detect_freq > 0) && |
| 2343 hung_window_detector_.Initialize(window, | 2343 hung_window_detector_.Initialize(window, |
| 2344 plugin_message_response_timeout)) { | 2344 plugin_message_response_timeout)) { |
| 2345 ticker_.set_tick_interval(hung_plugin_detect_freq); | 2345 ticker_.set_tick_interval(hung_plugin_detect_freq); |
| 2346 ticker_.RegisterTickHandler(&hung_window_detector_); | 2346 ticker_.RegisterTickHandler(&hung_window_detector_); |
| 2347 ticker_.Start(); | 2347 ticker_.Start(); |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2587 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { | 2587 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { |
| 2588 gfx::Point icon_bottom( | 2588 gfx::Point icon_bottom( |
| 2589 toolbar_->location_bar()->GetLocationBarAnchorPoint()); | 2589 toolbar_->location_bar()->GetLocationBarAnchorPoint()); |
| 2590 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); | 2590 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); |
| 2591 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); | 2591 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); |
| 2592 ConvertPointToTarget(infobar_container_, this, &infobar_top); | 2592 ConvertPointToTarget(infobar_container_, this, &infobar_top); |
| 2593 top_arrow_height = infobar_top.y() - icon_bottom.y(); | 2593 top_arrow_height = infobar_top.y() - icon_bottom.y(); |
| 2594 } | 2594 } |
| 2595 return top_arrow_height; | 2595 return top_arrow_height; |
| 2596 } | 2596 } |
| OLD | NEW |