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

Side by Side Diff: views/controls/menu/menu_controller.cc

Issue 6507028: Remove usages of RootView from View by moving relevant RootView API methods t... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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 | « chrome/browser/ui/views/tabs/dragged_tab_controller.cc ('k') | views/view.h » ('j') | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "views/controls/menu/menu_controller.h" 5 #include "views/controls/menu/menu_controller.h"
6 6
7 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "base/time.h" 8 #include "base/time.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "ui/base/dragdrop/os_exchange_data.h" 10 #include "ui/base/dragdrop/os_exchange_data.h"
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 gfx::CanvasSkia canvas(item->width(), item->height(), false); 456 gfx::CanvasSkia canvas(item->width(), item->height(), false);
457 item->Paint(&canvas, true); 457 item->Paint(&canvas, true);
458 458
459 OSExchangeData data; 459 OSExchangeData data;
460 item->GetDelegate()->WriteDragData(item, &data); 460 item->GetDelegate()->WriteDragData(item, &data);
461 drag_utils::SetDragImageOnDataObject(canvas, item->size(), press_loc, 461 drag_utils::SetDragImageOnDataObject(canvas, item->size(), press_loc,
462 &data); 462 &data);
463 StopScrolling(); 463 StopScrolling();
464 int drag_ops = item->GetDelegate()->GetDragOperations(item); 464 int drag_ops = item->GetDelegate()->GetDragOperations(item);
465 drag_in_progress_ = true; 465 drag_in_progress_ = true;
466 item->GetRootView()->StartDragForViewFromMouseEvent( 466 item->GetWidget()->StartDragForViewFromMouseEvent(NULL, data, drag_ops);
467 NULL, data, drag_ops);
468 drag_in_progress_ = false; 467 drag_in_progress_ = false;
469 468
470 if (GetActiveInstance() == this) { 469 if (GetActiveInstance() == this) {
471 if (showing_) { 470 if (showing_) {
472 // We're still showing, close all menus. 471 // We're still showing, close all menus.
473 CloseAllNestedMenus(); 472 CloseAllNestedMenus();
474 Cancel(EXIT_ALL); 473 Cancel(EXIT_ALL);
475 } // else case, drop was on us. 474 } // else case, drop was on us.
476 } // else case, someone canceled us, don't do anything 475 } // else case, someone canceled us, don't do anything
477 } 476 }
(...skipping 1357 matching lines...) Expand 10 before | Expand all | Expand 10 after
1835 1834
1836 MouseEvent release_event(ui::ET_MOUSE_RELEASED, -1, -1, 0); 1835 MouseEvent release_event(ui::ET_MOUSE_RELEASED, -1, -1, 0);
1837 // Reset the active_mouse_view_ before sending mouse released. That way if if 1836 // Reset the active_mouse_view_ before sending mouse released. That way if if
1838 // calls back to use we aren't in a weird state. 1837 // calls back to use we aren't in a weird state.
1839 View* active_view = active_mouse_view_; 1838 View* active_view = active_mouse_view_;
1840 active_mouse_view_ = NULL; 1839 active_mouse_view_ = NULL;
1841 active_view->OnMouseReleased(release_event, true); 1840 active_view->OnMouseReleased(release_event, true);
1842 } 1841 }
1843 1842
1844 } // namespace views 1843 } // namespace views
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/dragged_tab_controller.cc ('k') | views/view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698