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

Unified Diff: chrome/browser/ui/views/extensions/extension_installed_bubble.cc

Issue 17293003: Reveal the top-of-window views upon opening an extension popup via a shortcut key in immersive mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | « no previous file | chrome/browser/ui/views/extensions/extension_popup.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/extensions/extension_installed_bubble.cc
diff --git a/chrome/browser/ui/views/extensions/extension_installed_bubble.cc b/chrome/browser/ui/views/extensions/extension_installed_bubble.cc
index caa0369e3ea6e67bfec23597b6965bb82cba49e0..b2a787ee03f7638090aaa8d2b01fa6794869db58 100644
--- a/chrome/browser/ui/views/extensions/extension_installed_bubble.cc
+++ b/chrome/browser/ui/views/extensions/extension_installed_bubble.cc
@@ -22,6 +22,7 @@
#include "chrome/browser/ui/views/browser_action_view.h"
#include "chrome/browser/ui/views/browser_actions_container.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
+#include "chrome/browser/ui/views/frame/immersive_mode_controller.h"
#include "chrome/browser/ui/views/location_bar/location_bar_view.h"
#include "chrome/browser/ui/views/tabs/tab_strip.h"
#include "chrome/browser/ui/views/toolbar_view.h"
@@ -653,6 +654,15 @@ void ExtensionInstalledBubble::ShowInternal() {
SetLayoutManager(new views::FillLayout());
AddChildView(
new InstalledBubbleContent(browser_, extension_, type_, &icon_, this));
+
+ // If we are in immersive fullscreen, reveal the top-of-window views
+ // (omnibox, toolbar) so that the view the bubble is anchored to is visible.
+ // We do not need to hold onto the lock because ImmersiveModeController will
+ // keep the top-of-window views revealed as long as the popup is active.
+ // TODO(pkotwicz): Move logic to ImmersiveModeController.
+ scoped_ptr<ImmersiveRevealedLock> immersive_reveal_lock(
+ browser_view->immersive_mode_controller()->GetRevealedLock(
+ ImmersiveModeController::ANIMATE_REVEAL_NO));
views::BubbleDelegateView::CreateBubble(this);
// The bubble widget is now the parent and owner of |this| and takes care of
« no previous file with comments | « no previous file | chrome/browser/ui/views/extensions/extension_popup.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698