OLD | NEW |
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_TAB_STRIP_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 void SetImmersiveStyle(bool enable); | 175 void SetImmersiveStyle(bool enable); |
176 | 176 |
177 // Returns true if Tabs in this TabStrip are currently changing size or | 177 // Returns true if Tabs in this TabStrip are currently changing size or |
178 // position. | 178 // position. |
179 bool IsAnimating() const; | 179 bool IsAnimating() const; |
180 | 180 |
181 // Stops any ongoing animations. If |layout| is true and an animation is | 181 // Stops any ongoing animations. If |layout| is true and an animation is |
182 // ongoing this does a layout. | 182 // ongoing this does a layout. |
183 void StopAnimating(bool layout); | 183 void StopAnimating(bool layout); |
184 | 184 |
| 185 // Called to indicate whether the given URL is a supported file. |
| 186 void FileSupported(const GURL& url, bool supported); |
| 187 |
185 // TabController overrides: | 188 // TabController overrides: |
186 virtual const ui::ListSelectionModel& GetSelectionModel() OVERRIDE; | 189 virtual const ui::ListSelectionModel& GetSelectionModel() OVERRIDE; |
187 virtual bool SupportsMultipleSelection() OVERRIDE; | 190 virtual bool SupportsMultipleSelection() OVERRIDE; |
188 virtual void SelectTab(Tab* tab) OVERRIDE; | 191 virtual void SelectTab(Tab* tab) OVERRIDE; |
189 virtual void ExtendSelectionTo(Tab* tab) OVERRIDE; | 192 virtual void ExtendSelectionTo(Tab* tab) OVERRIDE; |
190 virtual void ToggleSelected(Tab* tab) OVERRIDE; | 193 virtual void ToggleSelected(Tab* tab) OVERRIDE; |
191 virtual void AddSelectionFromAnchorTo(Tab* tab) OVERRIDE; | 194 virtual void AddSelectionFromAnchorTo(Tab* tab) OVERRIDE; |
192 virtual void CloseTab(Tab* tab, CloseTabSource source) OVERRIDE; | 195 virtual void CloseTab(Tab* tab, CloseTabSource source) OVERRIDE; |
193 virtual void ShowContextMenuForTab(Tab* tab, | 196 virtual void ShowContextMenuForTab(Tab* tab, |
194 const gfx::Point& p, | 197 const gfx::Point& p, |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 | 291 |
289 // Direction the arrow should point in. If true, the arrow is displayed | 292 // Direction the arrow should point in. If true, the arrow is displayed |
290 // above the tab and points down. If false, the arrow is displayed beneath | 293 // above the tab and points down. If false, the arrow is displayed beneath |
291 // the tab and points up. | 294 // the tab and points up. |
292 bool point_down; | 295 bool point_down; |
293 | 296 |
294 // Renders the drop indicator. | 297 // Renders the drop indicator. |
295 views::Widget* arrow_window; | 298 views::Widget* arrow_window; |
296 views::ImageView* arrow_view; | 299 views::ImageView* arrow_view; |
297 | 300 |
| 301 // The URL for the drop event. |
| 302 GURL url; |
| 303 |
| 304 // Whether the MIME type of the file pointed to by |url| is supported. |
| 305 bool file_supported; |
| 306 |
298 private: | 307 private: |
299 DISALLOW_COPY_AND_ASSIGN(DropInfo); | 308 DISALLOW_COPY_AND_ASSIGN(DropInfo); |
300 }; | 309 }; |
301 | 310 |
302 void Init(); | 311 void Init(); |
303 | 312 |
304 // Creates and returns a new tab. The caller owners the returned tab. | 313 // Creates and returns a new tab. The caller owners the returned tab. |
305 Tab* CreateTab(); | 314 Tab* CreateTab(); |
306 | 315 |
307 // Invoked from |AddTabAt| after the newly created tab has been inserted. | 316 // Invoked from |AddTabAt| after the newly created tab has been inserted. |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
628 bool immersive_style_; | 637 bool immersive_style_; |
629 | 638 |
630 // Our observers. | 639 // Our observers. |
631 typedef ObserverList<TabStripObserver> TabStripObservers; | 640 typedef ObserverList<TabStripObserver> TabStripObservers; |
632 TabStripObservers observers_; | 641 TabStripObservers observers_; |
633 | 642 |
634 DISALLOW_COPY_AND_ASSIGN(TabStrip); | 643 DISALLOW_COPY_AND_ASSIGN(TabStrip); |
635 }; | 644 }; |
636 | 645 |
637 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ | 646 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ |
OLD | NEW |