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

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 2770423002: Do not show permission bubble when browser is not active (Closed)
Patch Set: Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/browser_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index b39783fb509d5e73454ee3f535cc97c7b86c0154..382bee4282ec8c318446f8806cd80f12b60127ba 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -1821,6 +1821,16 @@ void BrowserView::OnWidgetDestroying(views::Widget* widget) {
delete content;
}
+void BrowserView::OnWidgetVisibilityChanged(views::Widget* widget,
sky 2017/03/27 15:47:51 I think this logic belongs closer to the permissio
Qiang(Joe) Xu 2017/03/27 21:09:52 Yeah, I agree. And checking activation instead of
+ bool visible) {
+ DCHECK_EQ(GetWidget(), widget);
+ if (widget->IsClosed() || !GetActiveWebContents())
+ return;
+
+ PermissionRequestManager::FromWebContents(GetActiveWebContents())
+ ->OnBrowserVisibilityChanged(visible);
+}
+
void BrowserView::OnWidgetActivationChanged(views::Widget* widget,
bool active) {
if (active)
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698