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

Unified Diff: ash/accelerators/accelerator_controller.cc

Issue 11411250: Immersive mode reveals the tabstrip/omnibox on top of web content (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update comment Created 8 years, 1 month 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/frame/browser_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_controller.cc
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc
index 0840b56ed4aee7de5b5175372b5784afb8896019..337e9198ecac032e67405e0667aa340a13af3c68 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -279,15 +279,13 @@ bool HandlePrintLayerHierarchy() {
}
bool HandlePrintViewHierarchy() {
- aura::Window* default_container =
- Shell::GetPrimaryRootWindowController()->GetContainer(
- internal::kShellWindowId_DefaultContainer);
- if (default_container->children().empty())
+ aura::Window* active_window = ash::wm::GetActiveWindow();
+ if (!active_window)
return true;
- aura::Window* browser_frame = default_container->children()[0];
views::Widget* browser_widget =
- views::Widget::GetWidgetForNativeWindow(browser_frame);
- views::PrintViewHierarchy(browser_widget->GetRootView());
+ views::Widget::GetWidgetForNativeWindow(active_window);
+ if (browser_widget)
+ views::PrintViewHierarchy(browser_widget->GetRootView());
return true;
}
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/browser_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698