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

Side by Side Diff: ash/wm/workspace/frame_maximize_button.cc

Issue 10829323: Fixing problem with not showing bubble (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/wm/workspace/frame_maximize_button.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/wm/workspace/frame_maximize_button.h" 5 #include "ash/wm/workspace/frame_maximize_button.h"
6 6
7 #include "ash/launcher/launcher.h" 7 #include "ash/launcher/launcher.h"
8 #include "ash/screen_ash.h" 8 #include "ash/screen_ash.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/wm/property_util.h" 10 #include "ash/wm/property_util.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 } 189 }
190 190
191 bool FrameMaximizeButton::OnMousePressed(const ui::MouseEvent& event) { 191 bool FrameMaximizeButton::OnMousePressed(const ui::MouseEvent& event) {
192 is_snap_enabled_ = event.IsLeftMouseButton(); 192 is_snap_enabled_ = event.IsLeftMouseButton();
193 if (is_snap_enabled_) 193 if (is_snap_enabled_)
194 ProcessStartEvent(event); 194 ProcessStartEvent(event);
195 ImageButton::OnMousePressed(event); 195 ImageButton::OnMousePressed(event);
196 return true; 196 return true;
197 } 197 }
198 198
199 void FrameMaximizeButton::OnMouseEntered(const ui::MouseEvent& event) { 199 void FrameMaximizeButton::OnMouseMoved(const ui::MouseEvent& event) {
200 // Note: This event only gets triggered when the mouse moves over the button.
200 ImageButton::OnMouseEntered(event); 201 ImageButton::OnMouseEntered(event);
sky 2012/08/14 20:11:38 ImageButton::OnMouseMoved
201 if (!maximizer_.get()) { 202 if (!maximizer_.get()) {
202 DCHECK(GetWidget()); 203 DCHECK(GetWidget());
203 if (!window_) { 204 if (!window_) {
204 window_ = frame_->GetWidget()->GetNativeWindow(); 205 window_ = frame_->GetWidget()->GetNativeWindow();
205 window_->AddObserver(this); 206 window_->AddObserver(this);
206 } 207 }
207 maximizer_.reset(new MaximizeBubbleController( 208 maximizer_.reset(new MaximizeBubbleController(
208 this, 209 this,
209 frame_->GetWidget()->IsMaximized(), 210 frame_->GetWidget()->IsMaximized(),
210 bubble_appearance_delay_ms_)); 211 bubble_appearance_delay_ms_));
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 break; 497 break;
497 case SNAP_RESTORE: 498 case SNAP_RESTORE:
498 frame_->GetWidget()->Restore(); 499 frame_->GetWidget()->Restore();
499 break; 500 break;
500 case SNAP_NONE: 501 case SNAP_NONE:
501 NOTREACHED(); 502 NOTREACHED();
502 } 503 }
503 } 504 }
504 505
505 } // namespace ash 506 } // namespace ash
OLDNEW
« 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