OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_TAB_CONTENTS_CONTAINER_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_TAB_CONTENTS_CONTAINER_GTK_H_ |
6 #define CHROME_BROWSER_UI_GTK_TAB_CONTENTS_CONTAINER_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_TAB_CONTENTS_CONTAINER_GTK_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/compiler_specific.h" |
12 #include "chrome/browser/ui/gtk/view_id_util.h" | 13 #include "chrome/browser/ui/gtk/view_id_util.h" |
13 #include "content/public/browser/notification_observer.h" | 14 #include "content/public/browser/notification_observer.h" |
14 #include "content/public/browser/notification_registrar.h" | 15 #include "content/public/browser/notification_registrar.h" |
15 #include "ui/base/gtk/gtk_signal.h" | 16 #include "ui/base/gtk/gtk_signal.h" |
16 #include "ui/base/gtk/owned_widget_gtk.h" | 17 #include "ui/base/gtk/owned_widget_gtk.h" |
17 | 18 |
18 class StatusBubbleGtk; | 19 class StatusBubbleGtk; |
19 class TabContents; | 20 class TabContents; |
20 class TabContentsWrapper; | 21 class TabContentsWrapper; |
21 | 22 |
(...skipping 18 matching lines...) Expand all Loading... |
40 | 41 |
41 void SetPreview(TabContentsWrapper* preview); | 42 void SetPreview(TabContentsWrapper* preview); |
42 void PopPreview(); | 43 void PopPreview(); |
43 | 44 |
44 // Remove the tab from the hierarchy. | 45 // Remove the tab from the hierarchy. |
45 void DetachTab(TabContentsWrapper* tab); | 46 void DetachTab(TabContentsWrapper* tab); |
46 | 47 |
47 // content::NotificationObserver implementation. | 48 // content::NotificationObserver implementation. |
48 virtual void Observe(int type, | 49 virtual void Observe(int type, |
49 const content::NotificationSource& source, | 50 const content::NotificationSource& source, |
50 const content::NotificationDetails& details); | 51 const content::NotificationDetails& details) OVERRIDE; |
51 | 52 |
52 GtkWidget* widget() { return floating_.get(); } | 53 GtkWidget* widget() { return floating_.get(); } |
53 | 54 |
54 // ViewIDUtil::Delegate implementation --------------------------------------- | 55 // ViewIDUtil::Delegate implementation --------------------------------------- |
55 virtual GtkWidget* GetWidgetForViewID(ViewID id); | 56 virtual GtkWidget* GetWidgetForViewID(ViewID id) OVERRIDE; |
56 | 57 |
57 private: | 58 private: |
58 // Called when a TabContents is destroyed. This gives us a chance to clean | 59 // Called when a TabContents is destroyed. This gives us a chance to clean |
59 // up our internal state if the TabContents is somehow destroyed before we | 60 // up our internal state if the TabContents is somehow destroyed before we |
60 // get notified. | 61 // get notified. |
61 void TabContentsDestroyed(TabContents* contents); | 62 void TabContentsDestroyed(TabContents* contents); |
62 | 63 |
63 // Handler for |floating_|'s "set-floating-position" signal. During this | 64 // Handler for |floating_|'s "set-floating-position" signal. During this |
64 // callback, we manually set the position of the status bubble. | 65 // callback, we manually set the position of the status bubble. |
65 static void OnSetFloatingPosition( | 66 static void OnSetFloatingPosition( |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 // We insert and remove TabContents GtkWidgets into this expanded_. This | 103 // We insert and remove TabContents GtkWidgets into this expanded_. This |
103 // should not be a GtkVBox since there were errors with timing where the vbox | 104 // should not be a GtkVBox since there were errors with timing where the vbox |
104 // was horizontally split with the top half displaying the current TabContents | 105 // was horizontally split with the top half displaying the current TabContents |
105 // and bottom half displaying the loading page. | 106 // and bottom half displaying the loading page. |
106 GtkWidget* expanded_; | 107 GtkWidget* expanded_; |
107 | 108 |
108 DISALLOW_COPY_AND_ASSIGN(TabContentsContainerGtk); | 109 DISALLOW_COPY_AND_ASSIGN(TabContentsContainerGtk); |
109 }; | 110 }; |
110 | 111 |
111 #endif // CHROME_BROWSER_UI_GTK_TAB_CONTENTS_CONTAINER_GTK_H_ | 112 #endif // CHROME_BROWSER_UI_GTK_TAB_CONTENTS_CONTAINER_GTK_H_ |
OLD | NEW |