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

Side by Side Diff: chrome/browser/views/infobars/infobars.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/info_bubble.cc ('k') | chrome/browser/views/location_bar_view.h » ('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/infobars/infobars.h" 5 #include "chrome/browser/views/infobars/infobars.h"
6 6
7 #include "app/gfx/chrome_canvas.h" 7 #include "app/gfx/canvas.h"
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "app/resource_bundle.h" 9 #include "app/resource_bundle.h"
10 #include "app/slide_animation.h" 10 #include "app/slide_animation.h"
11 #include "base/message_loop.h" 11 #include "base/message_loop.h"
12 #include "chrome/browser/views/event_utils.h" 12 #include "chrome/browser/views/event_utils.h"
13 #include "chrome/browser/views/infobars/infobar_container.h" 13 #include "chrome/browser/views/infobars/infobar_container.h"
14 #include "grit/generated_resources.h" 14 #include "grit/generated_resources.h"
15 #include "grit/theme_resources.h" 15 #include "grit/theme_resources.h"
16 #include "views/background.h" 16 #include "views/background.h"
17 #include "views/controls/button/image_button.h" 17 #include "views/controls/button/image_button.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 class InfoBarBackground : public views::Background { 58 class InfoBarBackground : public views::Background {
59 public: 59 public:
60 InfoBarBackground() { 60 InfoBarBackground() {
61 gradient_background_.reset( 61 gradient_background_.reset(
62 views::Background::CreateVerticalGradientBackground( 62 views::Background::CreateVerticalGradientBackground(
63 kBackgroundColorTop, kBackgroundColorBottom)); 63 kBackgroundColorTop, kBackgroundColorBottom));
64 } 64 }
65 65
66 // Overridden from views::View: 66 // Overridden from views::View:
67 virtual void Paint(ChromeCanvas* canvas, views::View* view) const { 67 virtual void Paint(gfx::Canvas* canvas, views::View* view) const {
68 // First paint the gradient background. 68 // First paint the gradient background.
69 gradient_background_->Paint(canvas, view); 69 gradient_background_->Paint(canvas, view);
70 70
71 // Now paint the separator line. 71 // Now paint the separator line.
72 canvas->FillRectInt(ResourceBundle::toolbar_separator_color, 0, 72 canvas->FillRectInt(ResourceBundle::toolbar_separator_color, 0,
73 view->height() - kSeparatorLineHeight, view->width(), 73 view->height() - kSeparatorLineHeight, view->width(),
74 kSeparatorLineHeight); 74 kSeparatorLineHeight);
75 } 75 }
76 76
77 private: 77 private:
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 483
484 InfoBar* LinkInfoBarDelegate::CreateInfoBar() { 484 InfoBar* LinkInfoBarDelegate::CreateInfoBar() {
485 return new LinkInfoBar(this); 485 return new LinkInfoBar(this);
486 } 486 }
487 487
488 // ConfirmInfoBarDelegate, InfoBarDelegate overrides: -------------------------- 488 // ConfirmInfoBarDelegate, InfoBarDelegate overrides: --------------------------
489 489
490 InfoBar* ConfirmInfoBarDelegate::CreateInfoBar() { 490 InfoBar* ConfirmInfoBarDelegate::CreateInfoBar() {
491 return new ConfirmInfoBar(this); 491 return new ConfirmInfoBar(this);
492 } 492 }
OLDNEW
« no previous file with comments | « chrome/browser/views/info_bubble.cc ('k') | chrome/browser/views/location_bar_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698