Chromium Code Reviews| Index: chrome/renderer/render_view.cc |
| =================================================================== |
| --- chrome/renderer/render_view.cc (revision 75215) |
| +++ chrome/renderer/render_view.cc (working copy) |
| @@ -133,6 +133,7 @@ |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebHistoryItem.h" |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebImage.h" |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h" |
| +#include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" |
|
darin (slow to review)
2011/02/17 06:42:32
this include seems unnecessary. it looks like lef
Ken Russell (switch to Gerrit)
2011/02/18 01:05:54
You're right; sorry about that. Removed.
|
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h" |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebNodeList.h" |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebPageSerializer.h" |
| @@ -5370,29 +5371,41 @@ |
| FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidHandleMouseEvent(event)); |
| } |
| -#if defined(OS_MACOSX) |
| void RenderView::OnWasHidden() { |
| RenderWidget::OnWasHidden(); |
| + if (webview()) { |
| + webview()->settings()->setMinimumTimerInterval( |
| + webkit_glue::kBackgroundTabTimerInterval); |
| + } |
| + |
| +#if defined(OS_MACOSX) |
| // Inform plugins that their container is no longer visible. |
| std::set<WebPluginDelegateProxy*>::iterator plugin_it; |
| for (plugin_it = plugin_delegates_.begin(); |
| plugin_it != plugin_delegates_.end(); ++plugin_it) { |
| (*plugin_it)->SetContainerVisibility(false); |
| } |
| +#endif // OS_MACOSX |
| } |
| void RenderView::OnWasRestored(bool needs_repainting) { |
| RenderWidget::OnWasRestored(needs_repainting); |
| + if (webview()) { |
| + webview()->settings()->setMinimumTimerInterval( |
| + webkit_glue::kForegroundTabTimerInterval); |
| + } |
| + |
| +#if defined(OS_MACOSX) |
| // Inform plugins that their container is now visible. |
| std::set<WebPluginDelegateProxy*>::iterator plugin_it; |
| for (plugin_it = plugin_delegates_.begin(); |
| plugin_it != plugin_delegates_.end(); ++plugin_it) { |
| (*plugin_it)->SetContainerVisibility(true); |
| } |
| +#endif // OS_MACOSX |
| } |
| -#endif // OS_MACOSX |
| void RenderView::OnSetFocus(bool enable) { |
| RenderWidget::OnSetFocus(enable); |