summaryrefslogtreecommitdiffstats
path: root/ui/aura_shell
diff options
context:
space:
mode:
authorpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-01 20:52:01 +0000
committerpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-01 20:52:01 +0000
commitc912c08abb9332a9fd9a2d8a17563fefa0a23b7d (patch)
treec98c8e7da1f4920633ed691ae59af2b740f25d8e /ui/aura_shell
parentdf3fb512f19d28c2803d4b1d6b6c66143581492b (diff)
downloadchromium_src-c912c08abb9332a9fd9a2d8a17563fefa0a23b7d.zip
chromium_src-c912c08abb9332a9fd9a2d8a17563fefa0a23b7d.tar.gz
chromium_src-c912c08abb9332a9fd9a2d8a17563fefa0a23b7d.tar.bz2
Added hotkey support to 8508009
Alt-L (print layer tree) Added name in RenderWidgetHostViewAura Made Window::SetName update the layer name. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=112232 Review URL: http://codereview.chromium.org/8585007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112528 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura_shell')
-rw-r--r--ui/aura_shell/desktop_background_view.cc2
-rw-r--r--ui/aura_shell/examples/lock_view.cc2
-rw-r--r--ui/aura_shell/examples/toplevel_window.cc2
-rw-r--r--ui/aura_shell/examples/widgets.cc2
-rw-r--r--ui/aura_shell/examples/window_type_launcher.cc6
-rw-r--r--ui/aura_shell/launcher/launcher.cc2
-rw-r--r--ui/aura_shell/modal_container_layout_manager.cc2
-rw-r--r--ui/aura_shell/shell_accelerator_controller.cc10
-rw-r--r--ui/aura_shell/status_area_view.cc2
9 files changed, 20 insertions, 10 deletions
diff --git a/ui/aura_shell/desktop_background_view.cc b/ui/aura_shell/desktop_background_view.cc
index 3f26f36..25532bb 100644
--- a/ui/aura_shell/desktop_background_view.cc
+++ b/ui/aura_shell/desktop_background_view.cc
@@ -55,7 +55,7 @@ views::Widget* CreateDesktopBackground() {
AddChild(desktop_widget->GetNativeView());
desktop_widget->SetContentsView(view);
desktop_widget->Show();
- desktop_widget->GetNativeView()->set_name("DesktopBackgroundView");
+ desktop_widget->GetNativeView()->SetName("DesktopBackgroundView");
return desktop_widget;
}
diff --git a/ui/aura_shell/examples/lock_view.cc b/ui/aura_shell/examples/lock_view.cc
index 68bb333..9929d16 100644
--- a/ui/aura_shell/examples/lock_view.cc
+++ b/ui/aura_shell/examples/lock_view.cc
@@ -65,7 +65,7 @@ void CreateLockScreen() {
AddChild(widget->GetNativeView());
widget->SetContentsView(lock_view);
widget->Show();
- widget->GetNativeView()->set_name("LockView");
+ widget->GetNativeView()->SetName("LockView");
}
} // namespace examples
diff --git a/ui/aura_shell/examples/toplevel_window.cc b/ui/aura_shell/examples/toplevel_window.cc
index f823c77..ade333a 100644
--- a/ui/aura_shell/examples/toplevel_window.cc
+++ b/ui/aura_shell/examples/toplevel_window.cc
@@ -23,7 +23,7 @@ void ToplevelWindow::CreateToplevelWindow(const CreateParams& params) {
views::Widget* widget =
views::Widget::CreateWindowWithBounds(new ToplevelWindow(params),
gfx::Rect(120, 150, 400, 300));
- widget->GetNativeView()->set_name("Examples:ToplevelWindow");
+ widget->GetNativeView()->SetName("Examples:ToplevelWindow");
widget->Show();
}
diff --git a/ui/aura_shell/examples/widgets.cc b/ui/aura_shell/examples/widgets.cc
index 73f55f3..9c4b52b 100644
--- a/ui/aura_shell/examples/widgets.cc
+++ b/ui/aura_shell/examples/widgets.cc
@@ -135,7 +135,7 @@ void CreateWidgetsWindow() {
gfx::Rect bounds(kWindowLeft, kWindowTop, kWindowWidth, kWindowHeight);
views::Widget* widget =
views::Widget::CreateWindowWithBounds(new WidgetsWindow, bounds);
- widget->GetNativeView()->set_name("WidgetsWindow");
+ widget->GetNativeView()->SetName("WidgetsWindow");
widget->Show();
}
diff --git a/ui/aura_shell/examples/window_type_launcher.cc b/ui/aura_shell/examples/window_type_launcher.cc
index 4573e0c..395f614 100644
--- a/ui/aura_shell/examples/window_type_launcher.cc
+++ b/ui/aura_shell/examples/window_type_launcher.cc
@@ -49,7 +49,7 @@ class ModalWindow : public views::WidgetDelegateView,
static void OpenModalWindow(aura::Window* parent) {
views::Widget* widget =
views::Widget::CreateWindowWithParent(new ModalWindow, parent);
- widget->GetNativeView()->set_name("ModalWindow");
+ widget->GetNativeView()->SetName("ModalWindow");
widget->Show();
}
@@ -108,7 +108,7 @@ class NonModalTransient : public views::WidgetDelegateView {
static void OpenNonModalTransient(aura::Window* parent) {
views::Widget* widget =
views::Widget::CreateWindowWithParent(new NonModalTransient, parent);
- widget->GetNativeView()->set_name("NonModalTransient");
+ widget->GetNativeView()->SetName("NonModalTransient");
widget->Show();
}
@@ -143,7 +143,7 @@ void InitWindowTypeLauncher() {
views::Widget* widget =
views::Widget::CreateWindowWithBounds(new WindowTypeLauncher,
gfx::Rect(120, 150, 400, 300));
- widget->GetNativeView()->set_name("WindowTypeLauncher");
+ widget->GetNativeView()->SetName("WindowTypeLauncher");
widget->Show();
}
diff --git a/ui/aura_shell/launcher/launcher.cc b/ui/aura_shell/launcher/launcher.cc
index 64a6c88..8b0ae38 100644
--- a/ui/aura_shell/launcher/launcher.cc
+++ b/ui/aura_shell/launcher/launcher.cc
@@ -38,7 +38,7 @@ Launcher::Launcher(aura::Window* window_container)
widget_->SetBounds(gfx::Rect(0, 0, pref.width(), pref.height()));
widget_->SetContentsView(launcher_view);
widget_->Show();
- widget_->GetNativeView()->set_name("LauncherView");
+ widget_->GetNativeView()->SetName("LauncherView");
}
Launcher::~Launcher() {
diff --git a/ui/aura_shell/modal_container_layout_manager.cc b/ui/aura_shell/modal_container_layout_manager.cc
index 7410a23..3b94903 100644
--- a/ui/aura_shell/modal_container_layout_manager.cc
+++ b/ui/aura_shell/modal_container_layout_manager.cc
@@ -160,7 +160,7 @@ void ModalContainerLayoutManager::CreateModalScreen() {
params.bounds = gfx::Rect(0, 0, container_->bounds().width(),
container_->bounds().height());
modal_screen_->Init(params);
- modal_screen_->GetNativeView()->set_name(
+ modal_screen_->GetNativeView()->SetName(
"ModalContainerLayoutManager.ModalScreen");
modal_screen_->SetContentsView(new ScreenView);
modal_screen_->GetNativeView()->layer()->SetOpacity(0.0f);
diff --git a/ui/aura_shell/shell_accelerator_controller.cc b/ui/aura_shell/shell_accelerator_controller.cc
index b381086..cc4a6ac 100644
--- a/ui/aura_shell/shell_accelerator_controller.cc
+++ b/ui/aura_shell/shell_accelerator_controller.cc
@@ -10,6 +10,7 @@
#include "ui/aura_shell/shell.h"
#include "ui/base/accelerators/accelerator.h"
#include "ui/base/accelerators/accelerator_manager.h"
+#include "ui/gfx/compositor/debug_utils.h"
#include "ui/gfx/compositor/layer_animation_sequence.h"
#include "ui/gfx/compositor/layer_animator.h"
#include "ui/gfx/compositor/screen_rotation.h"
@@ -22,6 +23,7 @@ enum AcceleratorAction {
TAKE_SCREENSHOT,
#if !defined(NDEBUG)
ROTATE_SCREEN,
+ PRINT_LAYER_HIERARCHY,
TOGGLE_DESKTOP_FULL_SCREEN,
#endif
};
@@ -41,6 +43,7 @@ struct AcceleratorData {
#if !defined(NDEBUG)
{ ui::VKEY_HOME, false, true, false, ROTATE_SCREEN },
{ ui::VKEY_F11, false, true, false, TOGGLE_DESKTOP_FULL_SCREEN },
+ { ui::VKEY_L, false, false, true, PRINT_LAYER_HIERARCHY },
#endif
};
@@ -98,6 +101,11 @@ bool HandleToggleDesktopFullScreen() {
aura::Desktop::GetInstance()->ToggleFullScreen();
return true;
}
+
+bool HandlePrintLayerHierarchy() {
+ ui::PrintLayerHierarchy(aura::Desktop::GetInstance()->layer());
+ return true;
+}
#endif
} // namespace
@@ -168,6 +176,8 @@ bool ShellAcceleratorController::AcceleratorPressed(
return HandleRotateScreen();
case TOGGLE_DESKTOP_FULL_SCREEN:
return HandleToggleDesktopFullScreen();
+ case PRINT_LAYER_HIERARCHY:
+ return HandlePrintLayerHierarchy();
#endif
default:
NOTREACHED() << "Unhandled action " << it->second;;
diff --git a/ui/aura_shell/status_area_view.cc b/ui/aura_shell/status_area_view.cc
index 94d73ab..af95c3a 100644
--- a/ui/aura_shell/status_area_view.cc
+++ b/ui/aura_shell/status_area_view.cc
@@ -45,7 +45,7 @@ AURA_SHELL_EXPORT views::Widget* CreateStatusArea() {
widget->Init(params);
widget->SetContentsView(status_area_view);
widget->Show();
- widget->GetNativeView()->set_name("StatusAreaView");
+ widget->GetNativeView()->SetName("StatusAreaView");
return widget;
}