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

Side by Side Diff: chrome/browser/tab_contents/tab_contents_view_gtk.h

Issue 502073: Revert 34954 - Fix issue 11258: Linux: gracefully handle small browser window... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_TAB_CONTENTS_TAB_CONTENTS_VIEW_GTK_H_ 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_GTK_H_
6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_GTK_H_ 6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_GTK_H_
7 7
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 // this will be perfectly happy to insert overlapping render views, so care 82 // this will be perfectly happy to insert overlapping render views, so care
83 // should be taken that the correct one is hidden/shown. 83 // should be taken that the correct one is hidden/shown.
84 void InsertIntoContentArea(GtkWidget* widget); 84 void InsertIntoContentArea(GtkWidget* widget);
85 85
86 void CancelDragIfAny(); 86 void CancelDragIfAny();
87 87
88 // We keep track of the timestamp of the latest mousedown event. 88 // We keep track of the timestamp of the latest mousedown event.
89 static gboolean OnMouseDown(GtkWidget* widget, 89 static gboolean OnMouseDown(GtkWidget* widget,
90 GdkEventButton* event, TabContentsViewGtk* view); 90 GdkEventButton* event, TabContentsViewGtk* view);
91 91
92 // Used to adjust the size of its children when the size of |expanded_| is 92 // Used to propagate size changes on |fixed_| to its children.
93 // changed. 93 static gboolean OnSizeAllocate(GtkWidget* widget,
94 static void OnChildSizeRequest(GtkWidget* widget, 94 GtkAllocation* config,
95 GtkWidget* child,
96 GtkRequisition* requisition,
97 TabContentsViewGtk* view); 95 TabContentsViewGtk* view);
98 96
99 // Used to propagate the size change of |expanded_| to our RWHV to resize the
100 // renderer content.
101 static void OnSizeAllocate(GtkWidget* widget,
102 GtkAllocation* allocation,
103 TabContentsViewGtk* view);
104
105 static void OnSetFloatingPosition( 97 static void OnSetFloatingPosition(
106 GtkFloatingContainer* floating_container, GtkAllocation* allocation, 98 GtkFloatingContainer* floating_container, GtkAllocation* allocation,
107 TabContentsViewGtk* tab_contents_view); 99 TabContentsViewGtk* tab_contents_view);
108 100
109 // Contains |expanded_| as its GtkBin member and a possible floating widget 101 // Contains |fixed_| as its GtkBin member and a possible floating widget from
110 // from |popup_view_|. 102 // |popup_view_|.
111 OwnedWidgetGtk floating_; 103 OwnedWidgetGtk floating_;
112 104
113 // This container holds the tab's web page views. It is a GtkExpandedContainer 105 // This container holds the tab's web page views. It is a GtkFixed so that we
114 // so that we can control the size of the web pages. 106 // can control the size of the web pages.
115 GtkWidget* expanded_; 107 GtkWidget* fixed_;
116 108
117 // The context menu is reset every time we show it, but we keep a pointer to 109 // The context menu is reset every time we show it, but we keep a pointer to
118 // between uses so that it won't go out of scope before we're done with it. 110 // between uses so that it won't go out of scope before we're done with it.
119 scoped_ptr<RenderViewContextMenuGtk> context_menu_; 111 scoped_ptr<RenderViewContextMenuGtk> context_menu_;
120 112
121 // The event for the last mouse down we handled. We need this for context 113 // The event for the last mouse down we handled. We need this for context
122 // menus and drags. 114 // menus and drags.
123 GdkEventButton last_mouse_down_; 115 GdkEventButton last_mouse_down_;
124 116
125 // Used to get notifications about renderers coming and going. 117 // Used to get notifications about renderers coming and going.
(...skipping 19 matching lines...) Expand all
145 scoped_ptr<TabContentsDragSource> drag_source_; 137 scoped_ptr<TabContentsDragSource> drag_source_;
146 138
147 // The size we want the tab contents view to be. We keep this in a separate 139 // The size we want the tab contents view to be. We keep this in a separate
148 // variable because resizing in GTK+ is async. 140 // variable because resizing in GTK+ is async.
149 gfx::Size requested_size_; 141 gfx::Size requested_size_;
150 142
151 DISALLOW_COPY_AND_ASSIGN(TabContentsViewGtk); 143 DISALLOW_COPY_AND_ASSIGN(TabContentsViewGtk);
152 }; 144 };
153 145
154 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_GTK_H_ 146 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_GTK_H_
OLDNEW
« no previous file with comments | « chrome/browser/gtk/tabs/tab_strip_gtk.cc ('k') | chrome/browser/tab_contents/tab_contents_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698