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

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

Issue 10825327: Adding unit tests for maximize menu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing build stopper Created 8 years, 4 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.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/frame_maximize_button.cc
diff --git a/ash/wm/workspace/frame_maximize_button.cc b/ash/wm/workspace/frame_maximize_button.cc
index b4873cc77ac0cc6008de043598fe51b74c8a9743..338db38f476a6bb85a6e8fe70c20f074a0d99c80 100644
--- a/ash/wm/workspace/frame_maximize_button.cc
+++ b/ash/wm/workspace/frame_maximize_button.cc
@@ -32,6 +32,9 @@ namespace {
// Delay before forcing an update of the snap location.
const int kUpdateDelayMS = 400;
+// The delay of the bubble appearance.
+const int kBubbleAppearanceDelayMS = 200;
+
}
// EscapeEventFilter is installed on the RootWindow to track when the escape key
@@ -107,7 +110,8 @@ FrameMaximizeButton::FrameMaximizeButton(views::ButtonListener* listener,
is_snap_enabled_(false),
exceeded_drag_threshold_(false),
window_(NULL),
- snap_type_(SNAP_NONE) {
+ snap_type_(SNAP_NONE),
+ bubble_appearance_delay_ms_(kBubbleAppearanceDelayMS) {
// TODO(sky): nuke this. It's temporary while we don't have good images.
SetImageAlignment(ALIGN_LEFT, ALIGN_BOTTOM);
}
@@ -202,7 +206,8 @@ void FrameMaximizeButton::OnMouseEntered(const ui::MouseEvent& event) {
}
maximizer_.reset(new MaximizeBubbleController(
this,
- frame_->GetWidget()->IsMaximized()));
+ frame_->GetWidget()->IsMaximized(),
+ bubble_appearance_delay_ms_));
}
}
@@ -285,7 +290,8 @@ void FrameMaximizeButton::ProcessStartEvent(const ui::LocatedEvent& event) {
if (!maximizer_.get()) {
maximizer_.reset(new MaximizeBubbleController(
this,
- frame_->GetWidget()->IsMaximized()));
+ frame_->GetWidget()->IsMaximized(),
+ bubble_appearance_delay_ms_));
} else {
// If the menu did not show up yet, we delay it even a bit more.
maximizer_->DelayCreation();
« no previous file with comments | « ash/wm/workspace/frame_maximize_button.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698