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

Side by Side Diff: chrome/browser/gtk/tabs/tab_renderer_gtk.h

Issue 159436: gtk: Use the requested window bounds when determining the location of the sou... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 4 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_GTK_TABS_TAB_RENDERER_GTK_H_ 5 #ifndef CHROME_BROWSER_GTK_TABS_TAB_RENDERER_GTK_H_
6 #define CHROME_BROWSER_GTK_TABS_TAB_RENDERER_GTK_H_ 6 #define CHROME_BROWSER_GTK_TABS_TAB_RENDERER_GTK_H_
7 7
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include "app/animation.h" 10 #include "app/animation.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 int x() const { return bounds_.x(); } 156 int x() const { return bounds_.x(); }
157 int y() const { return bounds_.y(); } 157 int y() const { return bounds_.y(); }
158 int width() const { return bounds_.width(); } 158 int width() const { return bounds_.width(); }
159 int height() const { return bounds_.height(); } 159 int height() const { return bounds_.height(); }
160 160
161 gfx::Rect bounds() const { return bounds_; } 161 gfx::Rect bounds() const { return bounds_; }
162 162
163 // Returns the non-mirrored (LTR) bounds of this tab. 163 // Returns the non-mirrored (LTR) bounds of this tab.
164 gfx::Rect GetNonMirroredBounds(GtkWidget* parent) const; 164 gfx::Rect GetNonMirroredBounds(GtkWidget* parent) const;
165 165
166 // Returns the requested bounds of the tab.
167 gfx::Rect GetRequisition() const;
168
166 // Sets the bounds of the tab. 169 // Sets the bounds of the tab.
167 void SetBounds(const gfx::Rect& bounds); 170 void SetBounds(const gfx::Rect& bounds);
168 171
169 GtkWidget* widget() const { return tab_.get(); } 172 GtkWidget* widget() const { return tab_.get(); }
170 173
171 protected: 174 protected:
172 const gfx::Rect& title_bounds() const { return title_bounds_; } 175 const gfx::Rect& title_bounds() const { return title_bounds_; }
173 const gfx::Rect& close_button_bounds() const { return close_button_bounds_; } 176 const gfx::Rect& close_button_bounds() const { return close_button_bounds_; }
174 177
175 // Returns the title of the Tab. 178 // Returns the title of the Tab.
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 321
319 // The animation object used to swap the favicon with the sad tab icon. 322 // The animation object used to swap the favicon with the sad tab icon.
320 scoped_ptr<FavIconCrashAnimation> crash_animation_; 323 scoped_ptr<FavIconCrashAnimation> crash_animation_;
321 324
322 // Set when the crashed favicon should be displayed. 325 // Set when the crashed favicon should be displayed.
323 bool should_display_crashed_favicon_; 326 bool should_display_crashed_favicon_;
324 327
325 // The bounds of this Tab. 328 // The bounds of this Tab.
326 gfx::Rect bounds_; 329 gfx::Rect bounds_;
327 330
331 // The requested bounds of this tab. These bounds are relative to the
332 // tabstrip.
333 gfx::Rect requisition_;
334
328 // Hover animation. 335 // Hover animation.
329 scoped_ptr<SlideAnimation> hover_animation_; 336 scoped_ptr<SlideAnimation> hover_animation_;
330 337
331 // Contains the loading animation state. 338 // Contains the loading animation state.
332 LoadingAnimation loading_animation_; 339 LoadingAnimation loading_animation_;
333 340
334 // TODO(jhawkins): If the theme is changed after the tab is created, we'll 341 // TODO(jhawkins): If the theme is changed after the tab is created, we'll
335 // still render the old theme for this tab. 342 // still render the old theme for this tab.
336 ThemeProvider* theme_provider_; 343 ThemeProvider* theme_provider_;
337 344
338 // The close button. 345 // The close button.
339 scoped_ptr<CustomDrawButton> close_button_; 346 scoped_ptr<CustomDrawButton> close_button_;
340 347
341 // The current color of the close button. 348 // The current color of the close button.
342 SkColor close_button_color_; 349 SkColor close_button_color_;
343 350
344 DISALLOW_COPY_AND_ASSIGN(TabRendererGtk); 351 DISALLOW_COPY_AND_ASSIGN(TabRendererGtk);
345 }; 352 };
346 353
347 #endif // CHROME_BROWSER_GTK_TABS_TAB_RENDERER_GTK_H_ 354 #endif // CHROME_BROWSER_GTK_TABS_TAB_RENDERER_GTK_H_
OLDNEW
« no previous file with comments | « chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc ('k') | chrome/browser/gtk/tabs/tab_renderer_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698