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

Side by Side Diff: ash/frame/caption_buttons/bubble_contents_button_row.cc

Issue 139983009: ui::LocatedEvent location() returns gfx::PointF (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Undo accidental change. Created 6 years, 7 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/frame/caption_buttons/bubble_contents_button_row.h" 5 #include "ash/frame/caption_buttons/bubble_contents_button_row.h"
6 6
7 #include "ash/frame/caption_buttons/maximize_bubble_controller.h" 7 #include "ash/frame/caption_buttons/maximize_bubble_controller.h"
8 #include "ash/frame/caption_buttons/maximize_bubble_controller_bubble.h" 8 #include "ash/frame/caption_buttons/maximize_bubble_controller_bubble.h"
9 #include "grit/ash_resources.h" 9 #include "grit/ash_resources.h"
10 #include "ui/base/resource/resource_bundle.h" 10 #include "ui/base/resource/resource_bundle.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 void BubbleDialogButton::OnMouseExited(const ui::MouseEvent& event) { 73 void BubbleDialogButton::OnMouseExited(const ui::MouseEvent& event) {
74 button_row_->ButtonHovered(NULL); 74 button_row_->ButtonHovered(NULL);
75 views::ImageButton::OnMouseExited(event); 75 views::ImageButton::OnMouseExited(event);
76 } 76 }
77 77
78 bool BubbleDialogButton::OnMouseDragged(const ui::MouseEvent& event) { 78 bool BubbleDialogButton::OnMouseDragged(const ui::MouseEvent& event) {
79 if (!button_row_->bubble()->controller()) 79 if (!button_row_->bubble()->controller())
80 return false; 80 return false;
81 81
82 // Remove the phantom window when we leave the button. 82 // Remove the phantom window when we leave the button.
83 gfx::Point screen_location(event.location()); 83 gfx::Point screen_location(gfx::ToFlooredPoint(event.location()));
84 View::ConvertPointToScreen(this, &screen_location); 84 View::ConvertPointToScreen(this, &screen_location);
85 if (!GetBoundsInScreen().Contains(screen_location)) 85 if (!GetBoundsInScreen().Contains(screen_location))
86 button_row_->ButtonHovered(NULL); 86 button_row_->ButtonHovered(NULL);
87 else 87 else
88 button_row_->ButtonHovered(this); 88 button_row_->ButtonHovered(this);
89 89
90 // Pass the event on to the normal handler. 90 // Pass the event on to the normal handler.
91 return views::ImageButton::OnMouseDragged(event); 91 return views::ImageButton::OnMouseDragged(event);
92 } 92 }
93 93
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 207
208 void BubbleContentsButtonRow::AddMinimizeButton() { 208 void BubbleContentsButtonRow::AddMinimizeButton() {
209 minimize_button_ = new BubbleDialogButton( 209 minimize_button_ = new BubbleDialogButton(
210 this, 210 this,
211 IDR_AURA_WINDOW_POSITION_MIDDLE, 211 IDR_AURA_WINDOW_POSITION_MIDDLE,
212 IDR_AURA_WINDOW_POSITION_MIDDLE_H, 212 IDR_AURA_WINDOW_POSITION_MIDDLE_H,
213 IDR_AURA_WINDOW_POSITION_MIDDLE_P); 213 IDR_AURA_WINDOW_POSITION_MIDDLE_P);
214 } 214 }
215 215
216 } // namespace ash 216 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698