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

Side by Side Diff: chrome/browser/ui/panels/panel_manager.cc

Issue 9616037: Change panel drag related methods to use mouse location in screen coordinates. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix mac trybot 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 unified diff | Download patch | Annotate | Revision Log
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 "chrome/browser/ui/panels/panel_manager.h" 5 #include "chrome/browser/ui/panels/panel_manager.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 154
155 drag_controller_->OnPanelClosed(panel); 155 drag_controller_->OnPanelClosed(panel);
156 panel->panel_strip()->RemovePanel(panel); 156 panel->panel_strip()->RemovePanel(panel);
157 157
158 content::NotificationService::current()->Notify( 158 content::NotificationService::current()->Notify(
159 chrome::NOTIFICATION_PANEL_CLOSED, 159 chrome::NOTIFICATION_PANEL_CLOSED,
160 content::Source<Panel>(panel), 160 content::Source<Panel>(panel),
161 content::NotificationService::NoDetails()); 161 content::NotificationService::NoDetails());
162 } 162 }
163 163
164 void PanelManager::StartDragging(Panel* panel) { 164 void PanelManager::StartDragging(Panel* panel,
165 drag_controller_->StartDragging(panel); 165 const gfx::Point& mouse_location) {
166 drag_controller_->StartDragging(panel, mouse_location);
166 } 167 }
167 168
168 void PanelManager::Drag(int delta_x, int delta_y) { 169 void PanelManager::Drag(const gfx::Point& mouse_location) {
169 drag_controller_->Drag(delta_x, delta_y); 170 drag_controller_->Drag(mouse_location);
170 } 171 }
171 172
172 void PanelManager::EndDragging(bool cancelled) { 173 void PanelManager::EndDragging(bool cancelled) {
173 drag_controller_->EndDragging(cancelled); 174 drag_controller_->EndDragging(cancelled);
174 } 175 }
175 176
176 void PanelManager::OnPanelExpansionStateChanged(Panel* panel) { 177 void PanelManager::OnPanelExpansionStateChanged(Panel* panel) {
177 docked_strip_->OnPanelExpansionStateChanged(panel); 178 docked_strip_->OnPanelExpansionStateChanged(panel);
178 } 179 }
179 180
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 return panels; 323 return panels;
323 } 324 }
324 325
325 int PanelManager::overflow_strip_width() const { 326 int PanelManager::overflow_strip_width() const {
326 return kOverflowStripThickness; 327 return kOverflowStripThickness;
327 } 328 }
328 329
329 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) { 330 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) {
330 panel_mouse_watcher_.reset(watcher); 331 panel_mouse_watcher_.reset(watcher);
331 } 332 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698