Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "content/browser/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1066 if (*iter) | 1066 if (*iter) |
| 1067 (*iter)->Hide(); | 1067 (*iter)->Hide(); |
| 1068 } | 1068 } |
| 1069 | 1069 |
| 1070 // Release any video power save blockers held as video is not visible. | 1070 // Release any video power save blockers held as video is not visible. |
| 1071 video_power_save_blocker_.reset(); | 1071 video_power_save_blocker_.reset(); |
| 1072 } | 1072 } |
| 1073 | 1073 |
| 1074 FOR_EACH_OBSERVER(WebContentsObserver, observers_, WasHidden()); | 1074 FOR_EACH_OBSERVER(WebContentsObserver, observers_, WasHidden()); |
| 1075 | 1075 |
| 1076 #if defined(OS_MACOSX) | |
| 1077 RenderViewHostDelegateView* view = GetDelegateView(); | |
| 1078 if (view) | |
| 1079 view->HidePopupMenu(); | |
| 1080 #endif | |
|
Avi (use Gerrit)
2015/01/06 15:46:39
Android also uses external popup menus; do we want
| |
| 1081 | |
| 1076 should_normally_be_visible_ = false; | 1082 should_normally_be_visible_ = false; |
| 1077 } | 1083 } |
| 1078 | 1084 |
| 1079 bool WebContentsImpl::NeedToFireBeforeUnload() { | 1085 bool WebContentsImpl::NeedToFireBeforeUnload() { |
| 1080 // TODO(creis): Should we fire even for interstitial pages? | 1086 // TODO(creis): Should we fire even for interstitial pages? |
| 1081 return WillNotifyDisconnection() && | 1087 return WillNotifyDisconnection() && |
| 1082 !ShowingInterstitialPage() && | 1088 !ShowingInterstitialPage() && |
| 1083 !static_cast<RenderViewHostImpl*>( | 1089 !static_cast<RenderViewHostImpl*>( |
| 1084 GetRenderViewHost())->SuddenTerminationAllowed(); | 1090 GetRenderViewHost())->SuddenTerminationAllowed(); |
| 1085 } | 1091 } |
| (...skipping 3295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4381 node->render_manager()->ResumeResponseDeferredAtStart(); | 4387 node->render_manager()->ResumeResponseDeferredAtStart(); |
| 4382 } | 4388 } |
| 4383 | 4389 |
| 4384 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4390 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
| 4385 force_disable_overscroll_content_ = force_disable; | 4391 force_disable_overscroll_content_ = force_disable; |
| 4386 if (view_) | 4392 if (view_) |
| 4387 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4393 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
| 4388 } | 4394 } |
| 4389 | 4395 |
| 4390 } // namespace content | 4396 } // namespace content |
| OLD | NEW |