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

Side by Side Diff: chrome/browser/ui/views/tabs/browser_tab_strip_controller.h

Issue 68133020: Fix dragging supported files to tab strip. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes Created 7 years 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 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_BROWSER_TAB_STRIP_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_BROWSER_TAB_STRIP_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_VIEWS_TABS_BROWSER_TAB_STRIP_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_VIEWS_TABS_BROWSER_TAB_STRIP_CONTROLLER_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/prefs/pref_change_registrar.h" 10 #include "base/prefs/pref_change_registrar.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 virtual void PerformDrop(bool drop_before, 67 virtual void PerformDrop(bool drop_before,
68 int index, 68 int index,
69 const GURL& url) OVERRIDE; 69 const GURL& url) OVERRIDE;
70 virtual bool IsCompatibleWith(TabStrip* other) const OVERRIDE; 70 virtual bool IsCompatibleWith(TabStrip* other) const OVERRIDE;
71 virtual void CreateNewTab() OVERRIDE; 71 virtual void CreateNewTab() OVERRIDE;
72 virtual void CreateNewTabWithLocation(const base::string16& loc) OVERRIDE; 72 virtual void CreateNewTabWithLocation(const base::string16& loc) OVERRIDE;
73 virtual bool IsIncognito() OVERRIDE; 73 virtual bool IsIncognito() OVERRIDE;
74 virtual void LayoutTypeMaybeChanged() OVERRIDE; 74 virtual void LayoutTypeMaybeChanged() OVERRIDE;
75 virtual void OnStartedDraggingTabs() OVERRIDE; 75 virtual void OnStartedDraggingTabs() OVERRIDE;
76 virtual void OnStoppedDraggingTabs() OVERRIDE; 76 virtual void OnStoppedDraggingTabs() OVERRIDE;
77 virtual void CheckFileSupported(const GURL& url) OVERRIDE;
77 78
78 // TabStripModelObserver implementation: 79 // TabStripModelObserver implementation:
79 virtual void TabInsertedAt(content::WebContents* contents, 80 virtual void TabInsertedAt(content::WebContents* contents,
80 int model_index, 81 int model_index,
81 bool is_active) OVERRIDE; 82 bool is_active) OVERRIDE;
82 virtual void TabDetachedAt(content::WebContents* contents, 83 virtual void TabDetachedAt(content::WebContents* contents,
83 int model_index) OVERRIDE; 84 int model_index) OVERRIDE;
84 virtual void TabSelectionChanged( 85 virtual void TabSelectionChanged(
85 TabStripModel* tab_strip_model, 86 TabStripModel* tab_strip_model,
86 const ui::ListSelectionModel& old_model) OVERRIDE; 87 const ui::ListSelectionModel& old_model) OVERRIDE;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 void StopHighlightTabsForCommand( 133 void StopHighlightTabsForCommand(
133 TabStripModel::ContextMenuCommand command_id, 134 TabStripModel::ContextMenuCommand command_id,
134 Tab* tab); 135 Tab* tab);
135 136
136 // Adds a tab. 137 // Adds a tab.
137 void AddTab(content::WebContents* contents, int index, bool is_active); 138 void AddTab(content::WebContents* contents, int index, bool is_active);
138 139
139 // Resets the tabstrips layout type from prefs. 140 // Resets the tabstrips layout type from prefs.
140 void UpdateLayoutType(); 141 void UpdateLayoutType();
141 142
143 // Notifies the tabstrip whether |url| is supported once a MIME type request
144 // has completed.
145 void OnFindURLMimeTypeCompleted(GURL url, const std::string& mime_type);
146
142 TabStripModel* model_; 147 TabStripModel* model_;
143 148
144 TabStrip* tabstrip_; 149 TabStrip* tabstrip_;
145 150
146 // Non-owning pointer to the browser which is using this controller. 151 // Non-owning pointer to the browser which is using this controller.
147 Browser* browser_; 152 Browser* browser_;
148 153
149 // If non-NULL it means we're showing a menu for the tab. 154 // If non-NULL it means we're showing a menu for the tab.
150 scoped_ptr<TabContextMenuContents> context_menu_contents_; 155 scoped_ptr<TabContextMenuContents> context_menu_contents_;
151 156
152 // Helper for performing tab selection as a result of dragging over a tab. 157 // Helper for performing tab selection as a result of dragging over a tab.
153 HoverTabSelector hover_tab_selector_; 158 HoverTabSelector hover_tab_selector_;
154 159
155 // Forces the tabs to use the regular (non-immersive) style and the 160 // Forces the tabs to use the regular (non-immersive) style and the
156 // top-of-window views to be revealed when the user is dragging |tabstrip|'s 161 // top-of-window views to be revealed when the user is dragging |tabstrip|'s
157 // tabs. 162 // tabs.
158 scoped_ptr<ImmersiveRevealedLock> immersive_reveal_lock_; 163 scoped_ptr<ImmersiveRevealedLock> immersive_reveal_lock_;
159 164
160 PrefChangeRegistrar local_pref_registrar_; 165 PrefChangeRegistrar local_pref_registrar_;
161 166
167 base::WeakPtrFactory<BrowserTabStripController> weak_ptr_factory_;
168
162 DISALLOW_COPY_AND_ASSIGN(BrowserTabStripController); 169 DISALLOW_COPY_AND_ASSIGN(BrowserTabStripController);
163 }; 170 };
164 171
165 #endif // CHROME_BROWSER_UI_VIEWS_TABS_BROWSER_TAB_STRIP_CONTROLLER_H_ 172 #endif // CHROME_BROWSER_UI_VIEWS_TABS_BROWSER_TAB_STRIP_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698