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

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: Patch to reland 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 148
149 drag_controller_->OnPanelClosed(panel); 149 drag_controller_->OnPanelClosed(panel);
150 panel->panel_strip()->RemovePanel(panel); 150 panel->panel_strip()->RemovePanel(panel);
151 151
152 content::NotificationService::current()->Notify( 152 content::NotificationService::current()->Notify(
153 chrome::NOTIFICATION_PANEL_CLOSED, 153 chrome::NOTIFICATION_PANEL_CLOSED,
154 content::Source<Panel>(panel), 154 content::Source<Panel>(panel),
155 content::NotificationService::NoDetails()); 155 content::NotificationService::NoDetails());
156 } 156 }
157 157
158 void PanelManager::StartDragging(Panel* panel) { 158 void PanelManager::StartDragging(Panel* panel,
159 drag_controller_->StartDragging(panel); 159 const gfx::Point& mouse_location) {
160 drag_controller_->StartDragging(panel, mouse_location);
160 } 161 }
161 162
162 void PanelManager::Drag(int delta_x, int delta_y) { 163 void PanelManager::Drag(const gfx::Point& mouse_location) {
163 drag_controller_->Drag(delta_x, delta_y); 164 drag_controller_->Drag(mouse_location);
164 } 165 }
165 166
166 void PanelManager::EndDragging(bool cancelled) { 167 void PanelManager::EndDragging(bool cancelled) {
167 drag_controller_->EndDragging(cancelled); 168 drag_controller_->EndDragging(cancelled);
168 } 169 }
169 170
170 void PanelManager::OnPanelExpansionStateChanged(Panel* panel) { 171 void PanelManager::OnPanelExpansionStateChanged(Panel* panel) {
171 docked_strip_->OnPanelExpansionStateChanged(panel); 172 docked_strip_->OnPanelExpansionStateChanged(panel);
172 } 173 }
173 174
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 return panels; 319 return panels;
319 } 320 }
320 321
321 int PanelManager::overflow_strip_width() const { 322 int PanelManager::overflow_strip_width() const {
322 return kOverflowStripThickness; 323 return kOverflowStripThickness;
323 } 324 }
324 325
325 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) { 326 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) {
326 panel_mouse_watcher_.reset(watcher); 327 panel_mouse_watcher_.reset(watcher);
327 } 328 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_manager.h ('k') | chrome/browser/ui/panels/panel_titlebar_view_cocoa.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698