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

Side by Side Diff: chrome/browser/ui/views/tabs/tab_strip.cc

Issue 1354823002: Render the tab close button as a vector-based icon. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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/tabs/tab.cc ('k') | ui/gfx/BUILD.gn » ('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 #include "chrome/browser/ui/views/tabs/tab_strip.h" 5 #include "chrome/browser/ui/views/tabs/tab_strip.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windowsx.h> 8 #include <windowsx.h>
9 #endif 9 #endif
10 10
(...skipping 1513 matching lines...) Expand 10 before | Expand all | Expand 10 after
1524 if (drop_indicator_width == 0) { 1524 if (drop_indicator_width == 0) {
1525 // Direction doesn't matter, both images are the same size. 1525 // Direction doesn't matter, both images are the same size.
1526 gfx::ImageSkia* drop_image = GetDropArrowImage(true); 1526 gfx::ImageSkia* drop_image = GetDropArrowImage(true);
1527 drop_indicator_width = drop_image->width(); 1527 drop_indicator_width = drop_image->width();
1528 drop_indicator_height = drop_image->height(); 1528 drop_indicator_height = drop_image->height();
1529 } 1529 }
1530 } 1530 }
1531 1531
1532 Tab* TabStrip::CreateTab() { 1532 Tab* TabStrip::CreateTab() {
1533 Tab* tab = new Tab(this); 1533 Tab* tab = new Tab(this);
1534 tab->set_animation_container(animation_container_.get()); 1534 tab->SetAnimationContainer(animation_container_.get());
1535 return tab; 1535 return tab;
1536 } 1536 }
1537 1537
1538 void TabStrip::StartInsertTabAnimation(int model_index) { 1538 void TabStrip::StartInsertTabAnimation(int model_index) {
1539 PrepareForAnimation(); 1539 PrepareForAnimation();
1540 1540
1541 // The TabStrip can now use its entire width to lay out Tabs. 1541 // The TabStrip can now use its entire width to lay out Tabs.
1542 in_tab_close_ = false; 1542 in_tab_close_ = false;
1543 available_width_for_tabs_ = -1; 1543 available_width_for_tabs_ = -1;
1544 1544
(...skipping 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after
2770 ConvertPointToViewAndGetEventHandler(this, newtab_button_, point); 2770 ConvertPointToViewAndGetEventHandler(this, newtab_button_, point);
2771 if (view) 2771 if (view)
2772 return view; 2772 return view;
2773 } 2773 }
2774 Tab* tab = FindTabForEvent(point); 2774 Tab* tab = FindTabForEvent(point);
2775 if (tab) 2775 if (tab)
2776 return ConvertPointToViewAndGetEventHandler(this, tab, point); 2776 return ConvertPointToViewAndGetEventHandler(this, tab, point);
2777 } 2777 }
2778 return this; 2778 return this;
2779 } 2779 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/tab.cc ('k') | ui/gfx/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698