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_GTK_TABS_TAB_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_TABS_TAB_GTK_H_ |
6 #define CHROME_BROWSER_UI_GTK_TABS_TAB_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_TABS_TAB_GTK_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
12 #include "chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h" | 12 #include "chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h" |
13 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 13 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
14 #include "ui/base/gtk/gtk_signal.h" | 14 #include "ui/base/gtk/gtk_signal.h" |
15 | 15 |
16 class TabStripMenuController; | 16 class TabStripMenuController; |
17 class ThemeService; | 17 class ThemeService; |
18 | 18 |
19 class TabGtk : public TabRendererGtk, | 19 class TabGtk : public TabRendererGtk, public base::MessageLoopForUI::Observer { |
20 public MessageLoopForUI::Observer { | |
21 public: | 20 public: |
22 // An interface implemented by an object that can help this Tab complete | 21 // An interface implemented by an object that can help this Tab complete |
23 // various actions. The index parameter is the index of this Tab in the | 22 // various actions. The index parameter is the index of this Tab in the |
24 // TabRenderer::Model. | 23 // TabRenderer::Model. |
25 class TabDelegate { | 24 class TabDelegate { |
26 public: | 25 public: |
27 // Returns true if the specified Tab is active. | 26 // Returns true if the specified Tab is active. |
28 virtual bool IsTabActive(const TabGtk* tab) const = 0; | 27 virtual bool IsTabActive(const TabGtk* tab) const = 0; |
29 | 28 |
30 // Returns true if the specified Tab is selected. | 29 // Returns true if the specified Tab is selected. |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 // mouse release event on the the dragged widget, otherwise, we don't know | 216 // mouse release event on the the dragged widget, otherwise, we don't know |
218 // when the drag has ended when the user presses space or enter. We queue | 217 // when the drag has ended when the user presses space or enter. We queue |
219 // a task to end the drag and only run it if GTK+ didn't send us the | 218 // a task to end the drag and only run it if GTK+ didn't send us the |
220 // drag-failed event. | 219 // drag-failed event. |
221 base::WeakPtrFactory<TabGtk> drag_end_factory_; | 220 base::WeakPtrFactory<TabGtk> drag_end_factory_; |
222 | 221 |
223 DISALLOW_COPY_AND_ASSIGN(TabGtk); | 222 DISALLOW_COPY_AND_ASSIGN(TabGtk); |
224 }; | 223 }; |
225 | 224 |
226 #endif // CHROME_BROWSER_UI_GTK_TABS_TAB_GTK_H_ | 225 #endif // CHROME_BROWSER_UI_GTK_TABS_TAB_GTK_H_ |
OLD | NEW |