| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/render_widget_host_view_win.h" | 5 #include "chrome/browser/render_widget_host_view_win.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/gfx/gdi_util.h" | 8 #include "base/gfx/gdi_util.h" |
| 9 #include "base/gfx/rect.h" | 9 #include "base/gfx/rect.h" |
| 10 #include "base/histogram.h" | 10 #include "base/histogram.h" |
| 11 #include "base/win_util.h" | 11 #include "base/win_util.h" |
| 12 #include "chrome/browser/browser_accessibility.h" | 12 #include "chrome/browser/browser_accessibility.h" |
| 13 #include "chrome/browser/browser_accessibility_manager.h" | 13 #include "chrome/browser/browser_accessibility_manager.h" |
| 14 #include "chrome/browser/browser_trial.h" | 14 #include "chrome/browser/browser_trial.h" |
| 15 #include "chrome/browser/render_process_host.h" | 15 #include "chrome/browser/render_process_host.h" |
| 16 // TODO(beng): (Cleanup) we should not need to include this file... see comment | 16 // TODO(beng): (Cleanup) we should not need to include this file... see comment |
| 17 // in |DidBecomeSelected|. | 17 // in |DidBecomeSelected|. |
| 18 #include "chrome/browser/render_view_host.h" | 18 #include "chrome/browser/render_view_host.h" |
| 19 #include "chrome/browser/render_widget_host.h" | 19 #include "chrome/browser/render_widget_host.h" |
| 20 #include "chrome/common/chrome_constants.h" | 20 #include "chrome/common/chrome_constants.h" |
| 21 #include "chrome/common/chrome_switches.h" | 21 #include "chrome/common/chrome_switches.h" |
| 22 #include "chrome/common/l10n_util.h" | 22 #include "chrome/common/l10n_util.h" |
| 23 #include "chrome/common/plugin_messages.h" | 23 #include "chrome/common/plugin_messages.h" |
| 24 #include "chrome/common/win_util.h" | 24 #include "chrome/common/win_util.h" |
| 25 // Included for views::kReflectedMessage - TODO(beng): move this to win_util.h! | 25 // Included for views::kReflectedMessage - TODO(beng): move this to win_util.h! |
| 26 #include "chrome/views/container_win.h" | 26 #include "chrome/views/container_win.h" |
| 27 #include "webkit/glue/webcursor.h" | 27 #include "webkit/glue/webcursor.h" |
| 28 | 28 |
| 29 using base::TimeDelta; |
| 30 using base::TimeTicks; |
| 31 |
| 29 namespace { | 32 namespace { |
| 30 | 33 |
| 31 // Tooltips will wrap after this width. Yes, wrap. Imagine that! | 34 // Tooltips will wrap after this width. Yes, wrap. Imagine that! |
| 32 const int kTooltipMaxWidthPixels = 300; | 35 const int kTooltipMaxWidthPixels = 300; |
| 33 | 36 |
| 34 // Maximum number of characters we allow in a tooltip. | 37 // Maximum number of characters we allow in a tooltip. |
| 35 const int kMaxTooltipLength = 1024; | 38 const int kMaxTooltipLength = 1024; |
| 36 | 39 |
| 37 // A callback function for EnumThreadWindows to enumerate and dismiss | 40 // A callback function for EnumThreadWindows to enumerate and dismiss |
| 38 // any owned popop windows | 41 // any owned popop windows |
| (...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 906 ::DestroyWindow(tooltip_hwnd_); | 909 ::DestroyWindow(tooltip_hwnd_); |
| 907 tooltip_hwnd_ = NULL; | 910 tooltip_hwnd_ = NULL; |
| 908 } | 911 } |
| 909 | 912 |
| 910 void RenderWidgetHostViewWin::ShutdownHost() { | 913 void RenderWidgetHostViewWin::ShutdownHost() { |
| 911 shutdown_factory_.RevokeAll(); | 914 shutdown_factory_.RevokeAll(); |
| 912 render_widget_host_->Shutdown(); | 915 render_widget_host_->Shutdown(); |
| 913 // Do not touch any members at this point, |this| has been deleted. | 916 // Do not touch any members at this point, |this| has been deleted. |
| 914 } | 917 } |
| 915 | 918 |
| OLD | NEW |