diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-15 07:37:29 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-15 07:37:29 +0000 |
commit | 82522511b7921e8c61742ebd80a4c674c56e7e48 (patch) | |
tree | 381d71de2b9c7b99675e6f2b4523ae0876c72ce8 /chrome/browser/views/autocomplete | |
parent | 631cf822bd6e64cf469544b42c9975f5602c29a6 (diff) | |
download | chromium_src-82522511b7921e8c61742ebd80a4c674c56e7e48.zip chromium_src-82522511b7921e8c61742ebd80a4c674c56e7e48.tar.gz chromium_src-82522511b7921e8c61742ebd80a4c674c56e7e48.tar.bz2 |
ChromeCanvas->gfx::Canvas
Rename files too.
TBR=brettw
http://crbug.com/11387
Review URL: http://codereview.chromium.org/113443
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16148 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/autocomplete')
-rw-r--r-- | chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc | 34 | ||||
-rw-r--r-- | chrome/browser/views/autocomplete/autocomplete_popup_contents_view.h | 6 |
2 files changed, 20 insertions, 20 deletions
diff --git a/chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc b/chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc index 43f4d98..9443639 100644 --- a/chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc +++ b/chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc @@ -8,7 +8,7 @@ #include <commctrl.h> #include <dwmapi.h> -#include "app/gfx/chrome_canvas.h" +#include "app/gfx/canvas.h" #include "app/gfx/color_utils.h" #include "app/gfx/insets.h" #include "app/gfx/path.h" @@ -71,7 +71,7 @@ class AutocompleteResultView : public views::View { virtual ~AutocompleteResultView(); // Overridden from views::View: - virtual void Paint(ChromeCanvas* canvas); + virtual void Paint(gfx::Canvas* canvas); virtual void Layout(); virtual gfx::Size GetPreferredSize(); virtual void OnMouseEntered(const views::MouseEvent& event); @@ -92,16 +92,16 @@ class AutocompleteResultView : public views::View { // |classifications|. If |force_dim| is true, ACMatchClassification::DIM is // added to all of the classifications. Returns the x position to the right // of the string. - int DrawString(ChromeCanvas* canvas, - const std::wstring& text, - const ACMatchClassifications& classifications, - bool force_dim, - int x, - int y); + int DrawString(gfx::Canvas* canvas, + const std::wstring& text, + const ACMatchClassifications& classifications, + bool force_dim, + int x, + int y); // Draws an individual sub-fragment with the specified style. Returns the x // position to the right of the fragment. - int DrawStringFragment(ChromeCanvas* canvas, + int DrawStringFragment(gfx::Canvas* canvas, const std::wstring& text, int style, int x, @@ -284,7 +284,7 @@ AutocompleteResultView::AutocompleteResultView( AutocompleteResultView::~AutocompleteResultView() { } -void AutocompleteResultView::Paint(ChromeCanvas* canvas) { +void AutocompleteResultView::Paint(gfx::Canvas* canvas) { canvas->FillRectInt(GetBackgroundColor(), 0, 0, width(), height()); int x = MirroredLeftPointForRect(icon_bounds_); @@ -421,7 +421,7 @@ SkBitmap* AutocompleteResultView::GetIcon() const { } int AutocompleteResultView::DrawString( - ChromeCanvas* canvas, + gfx::Canvas* canvas, const std::wstring& text, const ACMatchClassifications& classifications, bool force_dim, @@ -494,7 +494,7 @@ int AutocompleteResultView::DrawString( } int AutocompleteResultView::DrawStringFragment( - ChromeCanvas* canvas, + gfx::Canvas* canvas, const std::wstring& text, int style, int x, @@ -563,7 +563,7 @@ class PopupBorder : public views::Border { } // Overridden from views::Border: - virtual void Paint(const views::View& view, ChromeCanvas* canvas) const; + virtual void Paint(const views::View& view, gfx::Canvas* canvas) const; virtual void GetInsets(gfx::Insets* insets) const; private: @@ -592,7 +592,7 @@ SkBitmap* PopupBorder::dropshadow_bottomright_ = NULL; SkBitmap* PopupBorder::dropshadow_bottom_ = NULL; SkBitmap* PopupBorder::dropshadow_bottomleft_ = NULL; -void PopupBorder::Paint(const views::View& view, ChromeCanvas* canvas) const { +void PopupBorder::Paint(const views::View& view, gfx::Canvas* canvas) const { int ds_tl_width = dropshadow_topleft_->width(); int ds_tl_height = dropshadow_topleft_->height(); int ds_tr_width = dropshadow_topright_->width(); @@ -767,7 +767,7 @@ void AutocompletePopupContentsView::SetSelectedLine(size_t index, //////////////////////////////////////////////////////////////////////////////// // AutocompletePopupContentsView, views::View overrides: -void AutocompletePopupContentsView::PaintChildren(ChromeCanvas* canvas) { +void AutocompletePopupContentsView::PaintChildren(gfx::Canvas* canvas) { // We paint our children in an unconventional way. // // Because the border of this view creates an anti-aliased round-rect region @@ -778,7 +778,7 @@ void AutocompletePopupContentsView::PaintChildren(ChromeCanvas* canvas) { // Instead, we paint all our children into a second canvas and use that as a // shader to fill a path representing the round-rect clipping region. This // yields a nice anti-aliased edge. - ChromeCanvas contents_canvas(width(), height(), true); + gfx::Canvas contents_canvas(width(), height(), true); contents_canvas.FillRectInt(kBackgroundColor, 0, 0, width(), height()); View::PaintChildren(&contents_canvas); // We want the contents background to be slightly transparent so we can see @@ -865,7 +865,7 @@ void AutocompletePopupContentsView::UpdateBlurRegion() { } void AutocompletePopupContentsView::MakeCanvasTransparent( - ChromeCanvas* canvas) { + gfx::Canvas* canvas) { // Allow the window blur effect to show through the popup background. SkPaint paint; SkColor transparency = win_util::ShouldUseVistaFrame() ? diff --git a/chrome/browser/views/autocomplete/autocomplete_popup_contents_view.h b/chrome/browser/views/autocomplete/autocomplete_popup_contents_view.h index 85cecbf..e5d4bc2 100644 --- a/chrome/browser/views/autocomplete/autocomplete_popup_contents_view.h +++ b/chrome/browser/views/autocomplete/autocomplete_popup_contents_view.h @@ -5,7 +5,7 @@ #ifndef CHROME_BROWSER_VIEWS_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_CONTENTS_VIEW_H_ #define CHROME_BROWSER_VIEWS_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_CONTENTS_VIEW_H_ -#include "app/gfx/chrome_font.h" +#include "app/gfx/font.h" #include "chrome/browser/autocomplete/autocomplete.h" #include "chrome/browser/autocomplete/autocomplete_popup_model.h" #include "chrome/browser/autocomplete/autocomplete_popup_view.h" @@ -77,7 +77,7 @@ class AutocompletePopupContentsView : public views::View, virtual void SetSelectedLine(size_t index, bool revert_to_default); // Overridden from views::View: - virtual void PaintChildren(ChromeCanvas* canvas); + virtual void PaintChildren(gfx::Canvas* canvas); virtual void Layout(); private: @@ -89,7 +89,7 @@ class AutocompletePopupContentsView : public views::View, void UpdateBlurRegion(); // Makes the contents of the canvas slightly transparent. - void MakeCanvasTransparent(ChromeCanvas* canvas); + void MakeCanvasTransparent(gfx::Canvas* canvas); // The popup that contains this view. AutocompletePopupWin* popup_; |