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

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

Issue 113443: ChromeCanvas->gfx::Canvas (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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
« no previous file with comments | « chrome/browser/views/tabs/tab_strip.h ('k') | chrome/browser/views/theme_helpers.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) 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 #include "chrome/browser/views/tabs/tab_strip.h" 5 #include "chrome/browser/views/tabs/tab_strip.h"
6 6
7 #include "app/drag_drop_types.h" 7 #include "app/drag_drop_types.h"
8 #include "app/gfx/chrome_canvas.h" 8 #include "app/gfx/canvas.h"
9 #include "app/gfx/path.h" 9 #include "app/gfx/path.h"
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
11 #include "app/os_exchange_data.h" 11 #include "app/os_exchange_data.h"
12 #include "app/resource_bundle.h" 12 #include "app/resource_bundle.h"
13 #include "app/slide_animation.h" 13 #include "app/slide_animation.h"
14 #include "app/win_util.h" 14 #include "app/win_util.h"
15 #include "base/gfx/size.h" 15 #include "base/gfx/size.h"
16 #include "base/stl_util-inl.h" 16 #include "base/stl_util-inl.h"
17 #include "chrome/browser/metrics/user_metrics.h" 17 #include "chrome/browser/metrics/user_metrics.h"
18 #include "chrome/browser/profile.h" 18 #include "chrome/browser/profile.h"
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 } else { 579 } else {
580 current_tab->ValidateLoadingAnimation(Tab::ANIMATION_LOADING); 580 current_tab->ValidateLoadingAnimation(Tab::ANIMATION_LOADING);
581 } 581 }
582 } 582 }
583 } 583 }
584 } 584 }
585 585
586 /////////////////////////////////////////////////////////////////////////////// 586 ///////////////////////////////////////////////////////////////////////////////
587 // TabStrip, views::View overrides: 587 // TabStrip, views::View overrides:
588 588
589 void TabStrip::PaintChildren(ChromeCanvas* canvas) { 589 void TabStrip::PaintChildren(gfx::Canvas* canvas) {
590 // Paint the tabs in reverse order, so they stack to the left. 590 // Paint the tabs in reverse order, so they stack to the left.
591 Tab* selected_tab = NULL; 591 Tab* selected_tab = NULL;
592 for (int i = GetTabCount() - 1; i >= 0; --i) { 592 for (int i = GetTabCount() - 1; i >= 0; --i) {
593 Tab* tab = GetTabAt(i); 593 Tab* tab = GetTabAt(i);
594 // We must ask the _Tab's_ model, not ourselves, because in some situations 594 // We must ask the _Tab's_ model, not ourselves, because in some situations
595 // the model will be different to this object, e.g. when a Tab is being 595 // the model will be different to this object, e.g. when a Tab is being
596 // removed after its TabContents has been destroyed. 596 // removed after its TabContents has been destroyed.
597 if (!tab->IsSelected()) { 597 if (!tab->IsSelected()) {
598 tab->ProcessPaint(canvas); 598 tab->ProcessPaint(canvas);
599 } else { 599 } else {
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after
1516 // If the TabContents being detached was removed as a result of a drag 1516 // If the TabContents being detached was removed as a result of a drag
1517 // gesture from its corresponding Tab, we don't want to remove the Tab from 1517 // gesture from its corresponding Tab, we don't want to remove the Tab from
1518 // the child list, because if we do so it'll stop receiving events and the 1518 // the child list, because if we do so it'll stop receiving events and the
1519 // drag will stall. So we only remove if a drag isn't active, or the Tab 1519 // drag will stall. So we only remove if a drag isn't active, or the Tab
1520 // was for some other TabContents. 1520 // was for some other TabContents.
1521 if (!IsDragSessionActive() || !drag_controller_->IsDragSourceTab(removed)) { 1521 if (!IsDragSessionActive() || !drag_controller_->IsDragSourceTab(removed)) {
1522 removed->GetParent()->RemoveChildView(removed); 1522 removed->GetParent()->RemoveChildView(removed);
1523 delete removed; 1523 delete removed;
1524 } 1524 }
1525 } 1525 }
OLDNEW
« no previous file with comments | « chrome/browser/views/tabs/tab_strip.h ('k') | chrome/browser/views/theme_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698