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

Unified Diff: chrome/browser/ui/views/tabs/tab_strip.h

Issue 68133020: Fix dragging supported files to tab strip. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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: chrome/browser/ui/views/tabs/tab_strip.h
diff --git a/chrome/browser/ui/views/tabs/tab_strip.h b/chrome/browser/ui/views/tabs/tab_strip.h
index f224f472dd192039519a1daa47dbaf27847e9571..93deb42f9e94e63b272e12ad1607690b7bcd0b60 100644
--- a/chrome/browser/ui/views/tabs/tab_strip.h
+++ b/chrome/browser/ui/views/tabs/tab_strip.h
@@ -391,6 +391,9 @@ class TabStrip : public views::View,
// |is_first_tab| is set to true.
void StoppedDraggingTab(Tab* tab, bool* is_first_tab);
+ // Called when a MIME type request for a dragged file has been completed.
+ void OnFindURLMimeTypeCompleted(GURL url, const std::string& mime_type);
+
// Takes ownership of |controller|.
void OwnDragController(TabDragController* controller);
@@ -579,6 +582,13 @@ class TabStrip : public views::View,
// Valid for the lifetime of a drag over us.
scoped_ptr<DropInfo> drop_info_;
+ // The URL from the latest DropTargetEvent.
sky 2013/11/15 00:48:54 All of this state, including the weak factory, sho
michaelpg 2013/11/18 23:24:51 I've moved the URL and supported boolean into Drop
+ GURL drag_url_;
+
+ // Whether the MIME type of the file pointed to by drag_url_ is supported.
+ // Defaults to true.
+ bool drag_file_supported_;
+
// To ensure all tabs pulse at the same time they share the same animation
// container. This is that animation container.
scoped_refptr<gfx::AnimationContainer> animation_container_;
@@ -630,6 +640,8 @@ class TabStrip : public views::View,
typedef ObserverList<TabStripObserver> TabStripObservers;
TabStripObservers observers_;
+ base::WeakPtrFactory<TabStrip> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(TabStrip);
};

Powered by Google App Engine
This is Rietveld 408576698