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

Unified Diff: ash/wm/workspace/phantom_window_controller.cc

Issue 9703026: Makes the maximize/restore button handling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporate review feedback Created 8 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 | « ash/wm/workspace/frame_maximize_button.cc ('k') | ash/wm/workspace_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/phantom_window_controller.cc
diff --git a/ash/wm/workspace/phantom_window_controller.cc b/ash/wm/workspace/phantom_window_controller.cc
index 44f72c363eaf625c110ddf5fafefa3e8fe4597b4..75deedc95cfd7c91773e629f8b681da62dc190c0 100644
--- a/ash/wm/workspace/phantom_window_controller.cc
+++ b/ash/wm/workspace/phantom_window_controller.cc
@@ -4,6 +4,8 @@
#include "ash/wm/workspace/phantom_window_controller.h"
+#include "ash/shell.h"
+#include "ash/shell_window_ids.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "ui/aura/window.h"
#include "ui/aura/window_observer.h"
@@ -175,8 +177,16 @@ void PhantomWindowController::ShowNow() {
views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP);
params.transparent = true;
params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
- params.parent = window_->parent();
+ if (type_ == TYPE_DESTINATION) {
+ params.parent = window_->parent();
+ } else {
+ // TYPE_EDGE is used by FrameMaximizeButton to highlight the launcher
+ // button, make sure the phantom appears over it.
+ params.parent =
+ Shell::GetInstance()->GetContainer(kShellWindowId_LauncherContainer);
+ }
params.can_activate = false;
+ params.keep_on_top = true;
phantom_widget_->set_focus_on_creation(false);
phantom_widget_->Init(params);
phantom_widget_->SetVisibilityChangedAnimationsEnabled(false);
« no previous file with comments | « ash/wm/workspace/frame_maximize_button.cc ('k') | ash/wm/workspace_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698