Chromium Code Reviews

Side by Side Diff: chrome/browser/views/tabs/tab_strip.h

Issue 1700016: Two changes to extension app icons:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
« no previous file with comments | « chrome/browser/views/tabs/tab_renderer.cc ('k') | chrome/browser/views/tabs/tab_strip.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_VIEWS_TABS_TAB_STRIP_H_ 5 #ifndef CHROME_BROWSER_VIEWS_TABS_TAB_STRIP_H_
6 #define CHROME_BROWSER_VIEWS_TABS_TAB_STRIP_H_ 6 #define CHROME_BROWSER_VIEWS_TABS_TAB_STRIP_H_
7 7
8 #include <vector>
9
8 #include "app/animation_container.h" 10 #include "app/animation_container.h"
9 #include "base/message_loop.h" 11 #include "base/message_loop.h"
10 #include "base/ref_counted.h" 12 #include "base/ref_counted.h"
11 #include "base/timer.h" 13 #include "base/timer.h"
12 #include "chrome/browser/tabs/tab_strip_model.h" 14 #include "chrome/browser/tabs/tab_strip_model.h"
13 #include "chrome/browser/views/tabs/base_tab_strip.h" 15 #include "chrome/browser/views/tabs/base_tab_strip.h"
14 #include "chrome/browser/views/tabs/tab.h" 16 #include "chrome/browser/views/tabs/tab.h"
15 #include "gfx/point.h" 17 #include "gfx/point.h"
16 #include "gfx/rect.h" 18 #include "gfx/rect.h"
17 #include "views/animation/bounds_animator.h" 19 #include "views/animation/bounds_animator.h"
(...skipping 151 matching lines...)
169 virtual void WillProcessMessage(const MSG& msg); 171 virtual void WillProcessMessage(const MSG& msg);
170 virtual void DidProcessMessage(const MSG& msg); 172 virtual void DidProcessMessage(const MSG& msg);
171 #else 173 #else
172 virtual void WillProcessEvent(GdkEvent* event); 174 virtual void WillProcessEvent(GdkEvent* event);
173 virtual void DidProcessEvent(GdkEvent* event); 175 virtual void DidProcessEvent(GdkEvent* event);
174 #endif 176 #endif
175 177
176 // Horizontal gap between mini and non-mini-tabs. 178 // Horizontal gap between mini and non-mini-tabs.
177 static const int mini_to_non_mini_gap_; 179 static const int mini_to_non_mini_gap_;
178 180
181 // Extra horizontal gap (on top of mini_to_non_mini_gap_) when one of the
182 // mini tabs is a nano tab.
183 static const int extra_gap_for_nano_;
184
179 private: 185 private:
180 class RemoveTabDelegate; 186 class RemoveTabDelegate;
181 187
182 friend class DraggedTabController; 188 friend class DraggedTabController;
183 189
184 // AnimationType used for tracking animations that require additional 190 // AnimationType used for tracking animations that require additional
185 // state beyond just animating the bounds of a view. 191 // state beyond just animating the bounds of a view.
186 // 192 //
187 // Currently the only animation special cased is that of inserting the new tab 193 // Currently the only animation special cased is that of inserting the new tab
188 // page at the end of the tab strip. Here's the steps that take place when 194 // page at the end of the tab strip. Here's the steps that take place when
(...skipping 74 matching lines...)
263 269
264 // Gets the number of Tabs in the collection. 270 // Gets the number of Tabs in the collection.
265 // WARNING: this is the number of tabs displayed by the tabstrip, which if 271 // WARNING: this is the number of tabs displayed by the tabstrip, which if
266 // an animation is ongoing is not necessarily the same as the number of tabs 272 // an animation is ongoing is not necessarily the same as the number of tabs
267 // in the model. 273 // in the model.
268 int GetTabCount() const; 274 int GetTabCount() const;
269 275
270 // Returns the number of mini-tabs. 276 // Returns the number of mini-tabs.
271 int GetMiniTabCount() const; 277 int GetMiniTabCount() const;
272 278
279 // Returns the number of nano-tabs.
280 int GetNanoTabCount() const;
281
273 // -- Tab Resize Layout ----------------------------------------------------- 282 // -- Tab Resize Layout -----------------------------------------------------
274 283
275 // Returns the exact (unrounded) current width of each tab. 284 // Returns the exact (unrounded) current width of each tab.
276 void GetCurrentTabWidths(double* unselected_width, 285 void GetCurrentTabWidths(double* unselected_width,
277 double* selected_width) const; 286 double* selected_width) const;
278 287
279 // Returns the exact (unrounded) desired width of each tab, based on the 288 // Returns the exact (unrounded) desired width of each tab, based on the
280 // desired strip width and number of tabs. If 289 // desired strip width and number of tabs. If
281 // |width_of_tabs_for_mouse_close_| is nonnegative we use that value in 290 // |width_of_tabs_for_mouse_close_| is nonnegative we use that value in
282 // calculating the desired strip width; otherwise we use the current width. 291 // calculating the desired strip width; otherwise we use the current width.
283 // |mini_tab_count| gives the number of mini-tabs, and |tab_count| the 292 // |mini_tab_count| gives the number of mini-tabs, |nano_tab_count| the
284 // number of mini and non-mini-tabs. 293 // number of mini-tabs and |tab_count| the number of mini and non-mini-tabs.
285 void GetDesiredTabWidths(int tab_count, 294 void GetDesiredTabWidths(int tab_count,
286 int mini_tab_count, 295 int mini_tab_count,
296 int nano_tab_count,
287 double* unselected_width, 297 double* unselected_width,
288 double* selected_width) const; 298 double* selected_width) const;
289 299
290 // Perform an animated resize-relayout of the TabStrip immediately. 300 // Perform an animated resize-relayout of the TabStrip immediately.
291 void ResizeLayoutTabs(); 301 void ResizeLayoutTabs();
292 302
293 // Returns whether or not the cursor is currently in the "tab strip zone" 303 // Returns whether or not the cursor is currently in the "tab strip zone"
294 // which is defined as the region above the TabStrip and a bit below it. 304 // which is defined as the region above the TabStrip and a bit below it.
295 bool IsCursorInTabStripZone() const; 305 bool IsCursorInTabStripZone() const;
296 306
(...skipping 158 matching lines...)
455 // Used for stage 1 of new tab animation. 465 // Used for stage 1 of new tab animation.
456 base::OneShotTimer<TabStrip> new_tab_timer_; 466 base::OneShotTimer<TabStrip> new_tab_timer_;
457 467
458 // Set for special animations. 468 // Set for special animations.
459 AnimationType animation_type_; 469 AnimationType animation_type_;
460 470
461 DISALLOW_COPY_AND_ASSIGN(TabStrip); 471 DISALLOW_COPY_AND_ASSIGN(TabStrip);
462 }; 472 };
463 473
464 #endif // CHROME_BROWSER_VIEWS_TABS_TAB_STRIP_H_ 474 #endif // CHROME_BROWSER_VIEWS_TABS_TAB_STRIP_H_
OLDNEW
« no previous file with comments | « chrome/browser/views/tabs/tab_renderer.cc ('k') | chrome/browser/views/tabs/tab_strip.cc » ('j') | no next file with comments »

Powered by Google App Engine