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

Side by Side Diff: chrome/browser/ui/views/tabs/tab.h

Issue 2441863002: Remove some more !IsModeMaterial code. (Closed)
Patch Set: restore Created 4 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
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/browser/ui/views/tabs/tab.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) 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_VIEWS_TABS_TAB_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_
6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ 6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_
7 7
8 #include <list> 8 #include <list>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 // ui::EventHandler: 219 // ui::EventHandler:
220 void OnGestureEvent(ui::GestureEvent* event) override; 220 void OnGestureEvent(ui::GestureEvent* event) override;
221 221
222 // Invoked from Layout to adjust the position of the favicon or alert 222 // Invoked from Layout to adjust the position of the favicon or alert
223 // indicator for pinned tabs. 223 // indicator for pinned tabs.
224 void MaybeAdjustLeftForPinnedTab(gfx::Rect* bounds) const; 224 void MaybeAdjustLeftForPinnedTab(gfx::Rect* bounds) const;
225 225
226 // Invoked from SetData after |data_| has been updated to the new data. 226 // Invoked from SetData after |data_| has been updated to the new data.
227 void DataChanged(const TabRendererData& old); 227 void DataChanged(const TabRendererData& old);
228 228
229 // Paint with the normal tab style. If |clip| is non-empty, the tab border 229 // Paints with the normal tab style. If |clip| is non-empty, the tab border
230 // should be clipped against it. 230 // should be clipped against it.
231 void PaintTab(gfx::Canvas* canvas, const gfx::Path& clip); 231 void PaintTab(gfx::Canvas* canvas, const gfx::Path& clip);
232 232
233 // Paint with the "immersive mode" light-bar style. 233 // Paints with the "immersive mode" light-bar style.
234 void PaintImmersiveTab(gfx::Canvas* canvas); 234 void PaintImmersiveTab(gfx::Canvas* canvas);
235 235
236 // Paint various portions of the Tab. 236 // Paints the background of an inactive tab.
237 void PaintInactiveTabBackground(gfx::Canvas* canvas, const gfx::Path& clip); 237 void PaintInactiveTabBackground(gfx::Canvas* canvas, const gfx::Path& clip);
238
239 // Paints a tab background using the image defined by |fill_id| at the
240 // provided offset. If |fill_id| is 0, it will fall back to using the solid
241 // color defined by the theme provider and ignore the offset.
238 void PaintTabBackgroundUsingFillId(gfx::Canvas* fill_canvas, 242 void PaintTabBackgroundUsingFillId(gfx::Canvas* fill_canvas,
239 gfx::Canvas* stroke_canvas, 243 gfx::Canvas* stroke_canvas,
240 bool is_active, 244 bool is_active,
241 int fill_id, 245 int fill_id,
242 bool has_custom_image,
243 int y_offset); 246 int y_offset);
244 247
245 // Paints the pinned tab title changed indicator and |favicon_|. |favicon_| 248 // Paints the pinned tab title changed indicator and |favicon_|. |favicon_|
246 // may be null. |favicon_draw_bounds| is |favicon_bounds_| adjusted for rtl 249 // may be null. |favicon_draw_bounds| is |favicon_bounds_| adjusted for rtl
247 // and clipped to the bounds of the tab. 250 // and clipped to the bounds of the tab.
248 void PaintPinnedTabTitleChangedIndicatorAndIcon( 251 void PaintPinnedTabTitleChangedIndicatorAndIcon(
249 gfx::Canvas* canvas, 252 gfx::Canvas* canvas,
250 const gfx::Rect& favicon_draw_bounds); 253 const gfx::Rect& favicon_draw_bounds);
251 254
252 // Paints the favicon, mirrored for RTL if needed. 255 // Paints the favicon, mirrored for RTL if needed.
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 362
360 // The favicon for the tab. This might be the sad tab icon or a copy of 363 // The favicon for the tab. This might be the sad tab icon or a copy of
361 // data().favicon and may be modified for theming. It is created on demand 364 // data().favicon and may be modified for theming. It is created on demand
362 // and thus may be null. 365 // and thus may be null.
363 gfx::ImageSkia favicon_; 366 gfx::ImageSkia favicon_;
364 367
365 DISALLOW_COPY_AND_ASSIGN(Tab); 368 DISALLOW_COPY_AND_ASSIGN(Tab);
366 }; 369 };
367 370
368 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ 371 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/browser/ui/views/tabs/tab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698