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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 839573002: On Mac: Hide any popup menus on the active view before switching to another. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698