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

Side by Side Diff: chrome/browser/ui/gtk/tab_contents_container_gtk.h

Issue 10959049: Change visibility semantics for Instant. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Enable a test Created 8 years, 2 months 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_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 7
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 18 matching lines...) Expand all
29 public: 29 public:
30 explicit TabContentsContainerGtk(StatusBubbleGtk* status_bubble); 30 explicit TabContentsContainerGtk(StatusBubbleGtk* status_bubble);
31 virtual ~TabContentsContainerGtk(); 31 virtual ~TabContentsContainerGtk();
32 32
33 void Init(); 33 void Init();
34 34
35 // Make the specified tab visible. 35 // Make the specified tab visible.
36 void SetTab(TabContents* tab); 36 void SetTab(TabContents* tab);
37 TabContents* tab() const { return tab_; } 37 TabContents* tab() const { return tab_; }
38 38
39 // Returns the TabContents currently displayed. 39 void SetPreview(TabContents* preview);
40 TabContents* GetVisibleTab();
41
42 bool HasPreview() const { return preview_ != NULL; } 40 bool HasPreview() const { return preview_ != NULL; }
43 41
44 void SetPreview(TabContents* preview); 42 // Returns the TabContents currently displayed.
45 void PopPreview(); 43 TabContents* GetVisibleTab() const { return preview_ ? preview_ : tab_; }
46 44
47 // Remove the tab from the hierarchy. 45 // Remove the tab from the hierarchy.
48 void DetachTab(TabContents* tab); 46 void DetachTab(TabContents* tab);
49 47
50 // content::NotificationObserver implementation. 48 // content::NotificationObserver implementation.
51 virtual void Observe(int type, 49 virtual void Observe(int type,
52 const content::NotificationSource& source, 50 const content::NotificationSource& source,
53 const content::NotificationDetails& details) OVERRIDE; 51 const content::NotificationDetails& details) OVERRIDE;
54 52
55 GtkWidget* widget() { return floating_.get(); } 53 GtkWidget* widget() { return floating_.get(); }
(...skipping 12 matching lines...) Expand all
68 static void OnSetFloatingPosition( 66 static void OnSetFloatingPosition(
69 GtkFloatingContainer* container, GtkAllocation* allocation, 67 GtkFloatingContainer* container, GtkAllocation* allocation,
70 TabContentsContainerGtk* tab_contents_container); 68 TabContentsContainerGtk* tab_contents_container);
71 69
72 // Adds |tab| to the container and starts showing it. 70 // Adds |tab| to the container and starts showing it.
73 void PackTab(TabContents* tab); 71 void PackTab(TabContents* tab);
74 72
75 // Stops showing |tab|. 73 // Stops showing |tab|.
76 void HideTab(TabContents* tab); 74 void HideTab(TabContents* tab);
77 75
78 // Removes |preview_|.
79 void RemovePreview();
80
81 // Handle focus traversal on the tab contents container. Focus should not 76 // Handle focus traversal on the tab contents container. Focus should not
82 // traverse to the preview contents. 77 // traverse to the preview contents.
83 CHROMEGTK_CALLBACK_1(TabContentsContainerGtk, gboolean, OnFocus, 78 CHROMEGTK_CALLBACK_1(TabContentsContainerGtk, gboolean, OnFocus,
84 GtkDirectionType); 79 GtkDirectionType);
85 80
86 content::NotificationRegistrar registrar_; 81 content::NotificationRegistrar registrar_;
87 82
88 // The TabContents for the currently selected tab. This will be showing 83 // The TabContents for the currently selected tab. This will be showing
89 // unless there is a preview contents. 84 // unless there is a preview contents.
90 TabContents* tab_; 85 TabContents* tab_;
(...skipping 14 matching lines...) Expand all
105 // We insert and remove WebContents GtkWidgets into this expanded_. This 100 // We insert and remove WebContents GtkWidgets into this expanded_. This
106 // should not be a GtkVBox since there were errors with timing where the vbox 101 // should not be a GtkVBox since there were errors with timing where the vbox
107 // was horizontally split with the top half displaying the current WebContents 102 // was horizontally split with the top half displaying the current WebContents
108 // and bottom half displaying the loading page. 103 // and bottom half displaying the loading page.
109 GtkWidget* expanded_; 104 GtkWidget* expanded_;
110 105
111 DISALLOW_COPY_AND_ASSIGN(TabContentsContainerGtk); 106 DISALLOW_COPY_AND_ASSIGN(TabContentsContainerGtk);
112 }; 107 };
113 108
114 #endif // CHROME_BROWSER_UI_GTK_TAB_CONTENTS_CONTAINER_GTK_H_ 109 #endif // CHROME_BROWSER_UI_GTK_TAB_CONTENTS_CONTAINER_GTK_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/browser_window_gtk.cc ('k') | chrome/browser/ui/gtk/tab_contents_container_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698