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

Unified Diff: ui/views/controls/menu/menu_controller.h

Issue 10388056: Fixes drag and drop crash. The problem was when I made (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/controls/menu/menu_controller.h
diff --git a/ui/views/controls/menu/menu_controller.h b/ui/views/controls/menu/menu_controller.h
index 8f3f054283c2222908cf43e5675890ba7843e911..088e813a3a826ccd0775e747cc0ade3b6cb24654 100644
--- a/ui/views/controls/menu/menu_controller.h
+++ b/ui/views/controls/menu/menu_controller.h
@@ -20,11 +20,15 @@
#include "ui/views/controls/menu/menu_delegate.h"
#include "ui/views/controls/menu/menu_item_view.h"
+#if defined(USE_AURA)
+namespace aura {
+class RootWindow;
+}
+#endif
+
namespace ui {
class OSExchangeData;
}
-using ui::OSExchangeData;
-
namespace views {
class DropTargetEvent;
@@ -110,9 +114,9 @@ class VIEWS_EXPORT MenuController : public MessageLoop::Dispatcher {
bool GetDropFormats(
SubmenuView* source,
int* formats,
- std::set<OSExchangeData::CustomFormat>* custom_formats);
+ std::set<ui::OSExchangeData::CustomFormat>* custom_formats);
bool AreDropTypesRequired(SubmenuView* source);
- bool CanDrop(SubmenuView* source, const OSExchangeData& data);
+ bool CanDrop(SubmenuView* source, const ui::OSExchangeData& data);
void OnDragEntered(SubmenuView* source, const DropTargetEvent& event);
int OnDragUpdated(SubmenuView* source, const DropTargetEvent& event);
void OnDragExited(SubmenuView* source);
@@ -495,6 +499,12 @@ class VIEWS_EXPORT MenuController : public MessageLoop::Dispatcher {
// Owner of child windows.
Widget* owner_;
+#if defined(USE_AURA)
+ // |owner_|s RootWindow. Cached as at the time we need it |owner_| may have
+ // been deleted.
+ aura::RootWindow* root_window_;
+#endif
+
// Indicates a possible drag operation.
bool possible_drag_;
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc ('k') | ui/views/controls/menu/menu_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698