summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/views')
-rw-r--r--chrome/browser/views/about_chrome_view.cc16
-rw-r--r--chrome/browser/views/about_chrome_view.h6
-rw-r--r--chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc34
-rw-r--r--chrome/browser/views/autocomplete/autocomplete_popup_contents_view.h6
-rw-r--r--chrome/browser/views/blocked_popup_container.cc4
-rw-r--r--chrome/browser/views/blocked_popup_container.h2
-rw-r--r--chrome/browser/views/bookmark_bar_view.cc14
-rw-r--r--chrome/browser/views/bookmark_bar_view.h4
-rw-r--r--chrome/browser/views/bookmark_bubble_view.cc2
-rw-r--r--chrome/browser/views/bookmark_manager_view.cc4
-rw-r--r--chrome/browser/views/bookmark_manager_view.h2
-rw-r--r--chrome/browser/views/bookmark_table_view.cc6
-rw-r--r--chrome/browser/views/constrained_window_impl.cc20
-rw-r--r--chrome/browser/views/download_item_view.cc6
-rw-r--r--chrome/browser/views/download_item_view.h6
-rw-r--r--chrome/browser/views/download_shelf_view.cc6
-rw-r--r--chrome/browser/views/download_shelf_view.h4
-rw-r--r--chrome/browser/views/find_bar_view.cc4
-rw-r--r--chrome/browser/views/find_bar_view.h2
-rw-r--r--chrome/browser/views/frame/browser_view.cc4
-rw-r--r--chrome/browser/views/frame/glass_browser_frame_view.cc12
-rw-r--r--chrome/browser/views/frame/glass_browser_frame_view.h10
-rw-r--r--chrome/browser/views/frame/opaque_browser_frame_view.cc20
-rw-r--r--chrome/browser/views/frame/opaque_browser_frame_view.h16
-rw-r--r--chrome/browser/views/fullscreen_exit_bubble.cc6
-rw-r--r--chrome/browser/views/hung_renderer_view.cc2
-rw-r--r--chrome/browser/views/info_bubble.cc4
-rw-r--r--chrome/browser/views/info_bubble.h2
-rw-r--r--chrome/browser/views/infobars/infobars.cc4
-rw-r--r--chrome/browser/views/location_bar_view.cc8
-rw-r--r--chrome/browser/views/location_bar_view.h10
-rw-r--r--chrome/browser/views/options/advanced_contents_view.cc4
-rw-r--r--chrome/browser/views/options/content_page_view.cc6
-rw-r--r--chrome/browser/views/options/cookies_view.cc2
-rw-r--r--chrome/browser/views/options/fonts_page_view.cc8
-rw-r--r--chrome/browser/views/options/languages_page_view.cc4
-rw-r--r--chrome/browser/views/options/options_group_view.cc6
-rw-r--r--chrome/browser/views/options/options_group_view.h2
-rw-r--r--chrome/browser/views/sad_tab_view.cc12
-rw-r--r--chrome/browser/views/sad_tab_view.h4
-rw-r--r--chrome/browser/views/shell_dialogs_win.cc2
-rw-r--r--chrome/browser/views/star_toggle.cc4
-rw-r--r--chrome/browser/views/star_toggle.h2
-rw-r--r--chrome/browser/views/status_bubble_views.cc6
-rw-r--r--chrome/browser/views/tab_icon_view.cc10
-rw-r--r--chrome/browser/views/tab_icon_view.h8
-rw-r--r--chrome/browser/views/tabs/dragged_tab_controller.cc6
-rw-r--r--chrome/browser/views/tabs/dragged_tab_view.cc12
-rw-r--r--chrome/browser/views/tabs/dragged_tab_view.h8
-rw-r--r--chrome/browser/views/tabs/hwnd_photobooth.cc4
-rw-r--r--chrome/browser/views/tabs/hwnd_photobooth.h6
-rw-r--r--chrome/browser/views/tabs/tab.cc2
-rw-r--r--chrome/browser/views/tabs/tab_renderer.cc16
-rw-r--r--chrome/browser/views/tabs/tab_renderer.h12
-rw-r--r--chrome/browser/views/tabs/tab_strip.cc4
-rw-r--r--chrome/browser/views/tabs/tab_strip.h2
-rw-r--r--chrome/browser/views/theme_helpers.cc4
-rw-r--r--chrome/browser/views/toolbar_view.cc4
-rw-r--r--chrome/browser/views/toolbar_view.h2
59 files changed, 205 insertions, 203 deletions
diff --git a/chrome/browser/views/about_chrome_view.cc b/chrome/browser/views/about_chrome_view.cc
index 1468a24..02b5175 100644
--- a/chrome/browser/views/about_chrome_view.cc
+++ b/chrome/browser/views/about_chrome_view.cc
@@ -6,7 +6,7 @@
#include <commdlg.h>
-#include "app/gfx/chrome_canvas.h"
+#include "app/gfx/canvas.h"
#include "app/gfx/color_utils.h"
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
@@ -351,7 +351,7 @@ void AboutChromeView::Layout() {
}
-void AboutChromeView::Paint(ChromeCanvas* canvas) {
+void AboutChromeView::Paint(gfx::Canvas* canvas) {
views::View::Paint(canvas);
// Draw the background image color (and the separator) across the dialog.
@@ -424,7 +424,7 @@ void AboutChromeView::Paint(ChromeCanvas* canvas) {
main_text_label_height_ = position.height() + font.height();
}
-void AboutChromeView::DrawTextAndPositionUrl(ChromeCanvas* canvas,
+void AboutChromeView::DrawTextAndPositionUrl(gfx::Canvas* canvas,
const std::wstring& text,
views::Link* link,
gfx::Rect* rect,
@@ -479,7 +479,7 @@ void AboutChromeView::DrawTextAndPositionUrl(ChromeCanvas* canvas,
}
}
-void AboutChromeView::DrawTextStartingFrom(ChromeCanvas* canvas,
+void AboutChromeView::DrawTextStartingFrom(gfx::Canvas* canvas,
const std::wstring& text,
gfx::Size* position,
const gfx::Rect& bounds,
@@ -492,10 +492,10 @@ void AboutChromeView::DrawTextStartingFrom(ChromeCanvas* canvas,
return;
int flags = (text_direction_is_rtl_ ?
- ChromeCanvas::TEXT_ALIGN_RIGHT :
- ChromeCanvas::TEXT_ALIGN_LEFT) |
- ChromeCanvas::MULTI_LINE |
- ChromeCanvas::HIDE_PREFIX;
+ gfx::Canvas::TEXT_ALIGN_RIGHT :
+ gfx::Canvas::TEXT_ALIGN_LEFT) |
+ gfx::Canvas::MULTI_LINE |
+ gfx::Canvas::HIDE_PREFIX;
// Iterate over each word in the text, or put in a more locale-neutral way:
// iterate to the next line breaking opportunity.
diff --git a/chrome/browser/views/about_chrome_view.h b/chrome/browser/views/about_chrome_view.h
index 8b87624..64438bb 100644
--- a/chrome/browser/views/about_chrome_view.h
+++ b/chrome/browser/views/about_chrome_view.h
@@ -41,7 +41,7 @@ class AboutChromeView : public views::View,
// Overridden from views::View:
virtual gfx::Size GetPreferredSize();
virtual void Layout();
- virtual void Paint(ChromeCanvas* canvas);
+ virtual void Paint(gfx::Canvas* canvas);
virtual void ViewHierarchyChanged(bool is_add,
views::View* parent,
views::View* child);
@@ -93,7 +93,7 @@ class AboutChromeView : public views::View,
// NOTE: The reason why we need this function is because while Skia knows how
// to wrap text appropriately, it doesn't tell us where it drew the last
// character, which we need to position the URLs within the text.
- void DrawTextAndPositionUrl(ChromeCanvas* canvas,
+ void DrawTextAndPositionUrl(gfx::Canvas* canvas,
const std::wstring& text,
views::Link* link,
gfx::Rect* rect,
@@ -106,7 +106,7 @@ class AboutChromeView : public views::View,
// |word_for_word| specifies whether to draw the text word for word or wheter
// to treat the text as one blurb (similar to the way url's are treated inside
// RTL text. For details on the other parameters, see DrawTextAndPositionUrl.
- void DrawTextStartingFrom(ChromeCanvas* canvas,
+ void DrawTextStartingFrom(gfx::Canvas* canvas,
const std::wstring& text,
gfx::Size* position,
const gfx::Rect& bounds,
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_;
diff --git a/chrome/browser/views/blocked_popup_container.cc b/chrome/browser/views/blocked_popup_container.cc
index b94adb1..fba9780 100644
--- a/chrome/browser/views/blocked_popup_container.cc
+++ b/chrome/browser/views/blocked_popup_container.cc
@@ -12,7 +12,7 @@
#include <math.h>
-#include "app/gfx/chrome_canvas.h"
+#include "app/gfx/canvas.h"
#include "app/gfx/path.h"
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
@@ -125,7 +125,7 @@ void BlockedPopupContainerView::UpdateLabel() {
SchedulePaint();
}
-void BlockedPopupContainerView::Paint(ChromeCanvas* canvas) {
+void BlockedPopupContainerView::Paint(gfx::Canvas* canvas) {
// Draw the standard background.
View::Paint(canvas);
diff --git a/chrome/browser/views/blocked_popup_container.h b/chrome/browser/views/blocked_popup_container.h
index dcf7d8f..291b0ee 100644
--- a/chrome/browser/views/blocked_popup_container.h
+++ b/chrome/browser/views/blocked_popup_container.h
@@ -52,7 +52,7 @@ class BlockedPopupContainerView : public views::View,
// Overridden from views::View:
// Paints our border and background. (Does not paint children.)
- virtual void Paint(ChromeCanvas* canvas);
+ virtual void Paint(gfx::Canvas* canvas);
// Sets positions of all child views.
virtual void Layout();
// Gets the desired size of the popup notification.
diff --git a/chrome/browser/views/bookmark_bar_view.cc b/chrome/browser/views/bookmark_bar_view.cc
index 1d552dd..d219f9e 100644
--- a/chrome/browser/views/bookmark_bar_view.cc
+++ b/chrome/browser/views/bookmark_bar_view.cc
@@ -6,7 +6,7 @@
#include <limits>
-#include "app/gfx/chrome_canvas.h"
+#include "app/gfx/canvas.h"
#include "app/gfx/text_elider.h"
#include "app/l10n_util.h"
#include "app/os_exchange_data.h"
@@ -256,7 +256,7 @@ class BookmarkFolderButton : public views::MenuButton {
return e.IsMiddleMouseButton();
}
- virtual void Paint(ChromeCanvas *canvas) {
+ virtual void Paint(gfx::Canvas *canvas) {
views::MenuButton::Paint(canvas, false);
}
@@ -310,7 +310,7 @@ class ButtonSeparatorView : public views::View {
ButtonSeparatorView() {}
virtual ~ButtonSeparatorView() {}
- virtual void Paint(ChromeCanvas* canvas) {
+ virtual void Paint(gfx::Canvas* canvas) {
SkPaint paint;
paint.setShader(skia::CreateGradientShader(0,
height() / 2,
@@ -554,7 +554,7 @@ void BookmarkBarView::ViewHierarchyChanged(bool is_add,
}
}
-void BookmarkBarView::Paint(ChromeCanvas* canvas) {
+void BookmarkBarView::Paint(gfx::Canvas* canvas) {
if (IsDetachedStyle()) {
// Draw the background to match the new tab page.
canvas->FillRectInt(kNewtabBackgroundColor, 0, 0, width(), height());
@@ -616,7 +616,7 @@ void BookmarkBarView::Paint(ChromeCanvas* canvas) {
}
}
-void BookmarkBarView::PaintChildren(ChromeCanvas* canvas) {
+void BookmarkBarView::PaintChildren(gfx::Canvas* canvas) {
View::PaintChildren(canvas);
if (drop_info_.get() && drop_info_->valid &&
@@ -892,7 +892,7 @@ MenuButton* BookmarkBarView::CreateOverflowButton() {
// right-to-left.
//
// By default, menu buttons are not flipped because they generally contain
- // text and flipping the ChromeCanvas object will break text rendering. Since
+ // text and flipping the gfx::Canvas object will break text rendering. Since
// the overflow button does not contain text, we can safely flip it.
button->EnableCanvasFlippingForRTLUI(true);
@@ -1053,7 +1053,7 @@ void BookmarkBarView::WriteDragData(View* sender,
for (int i = 0; i < GetBookmarkButtonCount(); ++i) {
if (sender == GetBookmarkButton(i)) {
views::TextButton* button = GetBookmarkButton(i);
- ChromeCanvas canvas(button->width(), button->height(), false);
+ gfx::Canvas canvas(button->width(), button->height(), false);
button->Paint(&canvas, true);
drag_utils::SetDragImageOnDataObject(canvas, button->width(),
button->height(), press_x,
diff --git a/chrome/browser/views/bookmark_bar_view.h b/chrome/browser/views/bookmark_bar_view.h
index 1986d2f..6e423a2 100644
--- a/chrome/browser/views/bookmark_bar_view.h
+++ b/chrome/browser/views/bookmark_bar_view.h
@@ -96,8 +96,8 @@ class BookmarkBarView : public views::View,
virtual void DidChangeBounds(const gfx::Rect& previous,
const gfx::Rect& current);
virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child);
- virtual void Paint(ChromeCanvas* canvas);
- virtual void PaintChildren(ChromeCanvas* canvas);
+ virtual void Paint(gfx::Canvas* canvas);
+ virtual void PaintChildren(gfx::Canvas* canvas);
virtual bool CanDrop(const OSExchangeData& data);
virtual void OnDragEntered(const views::DropTargetEvent& event);
virtual int OnDragUpdated(const views::DropTargetEvent& event);
diff --git a/chrome/browser/views/bookmark_bubble_view.cc b/chrome/browser/views/bookmark_bubble_view.cc
index e24665c..71fd4f1 100644
--- a/chrome/browser/views/bookmark_bubble_view.cc
+++ b/chrome/browser/views/bookmark_bubble_view.cc
@@ -4,7 +4,7 @@
#include "chrome/browser/views/bookmark_bubble_view.h"
-#include "app/gfx/chrome_canvas.h"
+#include "app/gfx/canvas.h"
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "chrome/app/chrome_dll_resource.h"
diff --git a/chrome/browser/views/bookmark_manager_view.cc b/chrome/browser/views/bookmark_manager_view.cc
index b627bf2..8a0b019 100644
--- a/chrome/browser/views/bookmark_manager_view.cc
+++ b/chrome/browser/views/bookmark_manager_view.cc
@@ -6,7 +6,7 @@
#include <algorithm>
-#include "app/gfx/chrome_canvas.h"
+#include "app/gfx/canvas.h"
#include "app/gfx/color_utils.h"
#include "base/thread.h"
#include "chrome/browser/bookmarks/bookmark_folder_tree_model.h"
@@ -302,7 +302,7 @@ std::vector<BookmarkNode*> BookmarkManagerView::GetSelectedTableNodes() {
return nodes;
}
-void BookmarkManagerView::PaintBackground(ChromeCanvas* canvas) {
+void BookmarkManagerView::PaintBackground(gfx::Canvas* canvas) {
canvas->drawColor(kBackgroundColorBottom, SkPorterDuff::kSrc_Mode);
SkPaint paint;
diff --git a/chrome/browser/views/bookmark_manager_view.h b/chrome/browser/views/bookmark_manager_view.h
index 33566a4..9c17571 100644
--- a/chrome/browser/views/bookmark_manager_view.h
+++ b/chrome/browser/views/bookmark_manager_view.h
@@ -76,7 +76,7 @@ class BookmarkManagerView : public views::View,
// Returns the selection of the table.
std::vector<BookmarkNode*> GetSelectedTableNodes();
- virtual void PaintBackground(ChromeCanvas* canvas);
+ virtual void PaintBackground(gfx::Canvas* canvas);
virtual gfx::Size GetPreferredSize();
diff --git a/chrome/browser/views/bookmark_table_view.cc b/chrome/browser/views/bookmark_table_view.cc
index 5c2c787..a0236bf 100644
--- a/chrome/browser/views/bookmark_table_view.cc
+++ b/chrome/browser/views/bookmark_table_view.cc
@@ -7,8 +7,8 @@
#include <commctrl.h>
#include "app/drag_drop_types.h"
-#include "app/gfx/chrome_canvas.h"
-#include "app/gfx/chrome_font.h"
+#include "app/gfx/canvas.h"
+#include "app/gfx/font.h"
#include "app/os_exchange_data.h"
#include "app/resource_bundle.h"
#include "base/base_drag_source.h"
@@ -420,7 +420,7 @@ void BookmarkTableView::PaintAltText() {
HDC dc = GetDC(GetNativeControlHWND());
gfx::Font font = GetAltTextFont();
gfx::Rect bounds = GetAltTextBounds();
- ChromeCanvas canvas(bounds.width(), bounds.height(), false);
+ gfx::Canvas canvas(bounds.width(), bounds.height(), false);
// Pad by 1 for halo.
canvas.DrawStringWithHalo(alt_text_, font, SK_ColorDKGRAY, SK_ColorWHITE, 1,
1, bounds.width() - 2, bounds.height() - 2,
diff --git a/chrome/browser/views/constrained_window_impl.cc b/chrome/browser/views/constrained_window_impl.cc
index 695d450..7b531c6 100644
--- a/chrome/browser/views/constrained_window_impl.cc
+++ b/chrome/browser/views/constrained_window_impl.cc
@@ -4,8 +4,8 @@
#include "chrome/browser/views/constrained_window_impl.h"
-#include "app/gfx/chrome_canvas.h"
-#include "app/gfx/chrome_font.h"
+#include "app/gfx/canvas.h"
+#include "app/gfx/font.h"
#include "app/gfx/path.h"
#include "app/gfx/text_elider.h"
#include "app/l10n_util.h"
@@ -177,7 +177,7 @@ class ConstrainedWindowFrameView
virtual void ResetWindowControls() { }
// Overridden from views::View:
- virtual void Paint(ChromeCanvas* canvas);
+ virtual void Paint(gfx::Canvas* canvas);
virtual void Layout();
virtual void ThemeChanged();
@@ -203,9 +203,9 @@ class ConstrainedWindowFrameView
int* title_thickness) const;
// Paints different parts of the window to the incoming canvas.
- void PaintFrameBorder(ChromeCanvas* canvas);
- void PaintTitleBar(ChromeCanvas* canvas);
- void PaintClientEdge(ChromeCanvas* canvas);
+ void PaintFrameBorder(gfx::Canvas* canvas);
+ void PaintTitleBar(gfx::Canvas* canvas);
+ void PaintClientEdge(gfx::Canvas* canvas);
// Layout various sub-components of this view.
void LayoutWindowControls();
@@ -381,7 +381,7 @@ void ConstrainedWindowFrameView::EnableClose(bool enable) {
////////////////////////////////////////////////////////////////////////////////
// ConstrainedWindowFrameView, views::View implementation:
-void ConstrainedWindowFrameView::Paint(ChromeCanvas* canvas) {
+void ConstrainedWindowFrameView::Paint(gfx::Canvas* canvas) {
PaintFrameBorder(canvas);
PaintTitleBar(canvas);
PaintClientEdge(canvas);
@@ -435,7 +435,7 @@ int ConstrainedWindowFrameView::TitleCoordinates(
return *title_top_spacing + *title_thickness + title_bottom_spacing;
}
-void ConstrainedWindowFrameView::PaintFrameBorder(ChromeCanvas* canvas) {
+void ConstrainedWindowFrameView::PaintFrameBorder(gfx::Canvas* canvas) {
SkBitmap* top_left_corner = resources_->GetPartBitmap(FRAME_TOP_LEFT_CORNER);
SkBitmap* top_right_corner =
resources_->GetPartBitmap(FRAME_TOP_RIGHT_CORNER);
@@ -502,13 +502,13 @@ void ConstrainedWindowFrameView::PaintFrameBorder(ChromeCanvas* canvas) {
height() - top_left_corner->height() - bottom_left_corner->height());
}
-void ConstrainedWindowFrameView::PaintTitleBar(ChromeCanvas* canvas) {
+void ConstrainedWindowFrameView::PaintTitleBar(gfx::Canvas* canvas) {
canvas->DrawStringInt(container_->GetWindowTitle(), *title_font_,
GetTitleColor(), MirroredLeftPointForRect(title_bounds_),
title_bounds_.y(), title_bounds_.width(), title_bounds_.height());
}
-void ConstrainedWindowFrameView::PaintClientEdge(ChromeCanvas* canvas) {
+void ConstrainedWindowFrameView::PaintClientEdge(gfx::Canvas* canvas) {
gfx::Rect client_edge_bounds(CalculateClientAreaBounds(width(), height()));
client_edge_bounds.Inset(-kClientEdgeThickness, -kClientEdgeThickness);
gfx::Rect frame_shadow_bounds(client_edge_bounds);
diff --git a/chrome/browser/views/download_item_view.cc b/chrome/browser/views/download_item_view.cc
index 1e9554f..138158e 100644
--- a/chrome/browser/views/download_item_view.cc
+++ b/chrome/browser/views/download_item_view.cc
@@ -6,7 +6,7 @@
#include <vector>
-#include "app/gfx/chrome_canvas.h"
+#include "app/gfx/canvas.h"
#include "app/gfx/text_elider.h"
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
@@ -429,7 +429,7 @@ void DownloadItemView::ButtonPressed(views::Button* sender) {
// Load an icon for the file type we're downloading, and animate any in progress
// download state.
-void DownloadItemView::Paint(ChromeCanvas* canvas) {
+void DownloadItemView::Paint(gfx::Canvas* canvas) {
BodyImageSet* body_image_set;
switch (body_state_) {
case NORMAL:
@@ -624,7 +624,7 @@ void DownloadItemView::Paint(ChromeCanvas* canvas) {
}
}
-void DownloadItemView::PaintBitmaps(ChromeCanvas* canvas,
+void DownloadItemView::PaintBitmaps(gfx::Canvas* canvas,
const SkBitmap* top_bitmap,
const SkBitmap* center_bitmap,
const SkBitmap* bottom_bitmap,
diff --git a/chrome/browser/views/download_item_view.h b/chrome/browser/views/download_item_view.h
index f81242f..1332e1b 100644
--- a/chrome/browser/views/download_item_view.h
+++ b/chrome/browser/views/download_item_view.h
@@ -18,7 +18,7 @@
#include <string>
-#include "app/gfx/chrome_font.h"
+#include "app/gfx/font.h"
#include "app/slide_animation.h"
#include "base/basictypes.h"
#include "base/scoped_ptr.h"
@@ -55,7 +55,7 @@ class DownloadItemView : public views::ButtonListener,
// View overrides
virtual void Layout();
- virtual void Paint(ChromeCanvas* canvas);
+ virtual void Paint(gfx::Canvas* canvas);
virtual gfx::Size GetPreferredSize();
virtual void OnMouseExited(const views::MouseEvent& event);
virtual void OnMouseMoved(const views::MouseEvent& event);
@@ -111,7 +111,7 @@ class DownloadItemView : public views::ButtonListener,
// Convenience method to paint the 3 vertical bitmaps (bottom, middle, top)
// that form the background.
- void PaintBitmaps(ChromeCanvas* canvas,
+ void PaintBitmaps(gfx::Canvas* canvas,
const SkBitmap* top_bitmap,
const SkBitmap* center_bitmap,
const SkBitmap* bottom_bitmap,
diff --git a/chrome/browser/views/download_shelf_view.cc b/chrome/browser/views/download_shelf_view.cc
index e2fd9f6..40d6520 100644
--- a/chrome/browser/views/download_shelf_view.cc
+++ b/chrome/browser/views/download_shelf_view.cc
@@ -6,7 +6,7 @@
#include <algorithm>
-#include "app/gfx/chrome_canvas.h"
+#include "app/gfx/canvas.h"
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "base/logging.h"
@@ -147,12 +147,12 @@ void DownloadShelfView::RemoveDownloadView(View* view) {
SchedulePaint();
}
-void DownloadShelfView::Paint(ChromeCanvas* canvas) {
+void DownloadShelfView::Paint(gfx::Canvas* canvas) {
PaintBackground(canvas);
PaintBorder(canvas);
}
-void DownloadShelfView::PaintBorder(ChromeCanvas* canvas) {
+void DownloadShelfView::PaintBorder(gfx::Canvas* canvas) {
canvas->FillRectInt(kBorderColor, 0, 0, width(), 1);
}
diff --git a/chrome/browser/views/download_shelf_view.h b/chrome/browser/views/download_shelf_view.h
index 325439f..af3fd59 100644
--- a/chrome/browser/views/download_shelf_view.h
+++ b/chrome/browser/views/download_shelf_view.h
@@ -38,7 +38,7 @@ class DownloadShelfView : public DownloadShelf,
// Implementation of View.
virtual gfx::Size GetPreferredSize();
virtual void Layout();
- virtual void Paint(ChromeCanvas* canvas);
+ virtual void Paint(gfx::Canvas* canvas);
// Implementation of AnimationDelegate.
virtual void AnimationProgressed(const Animation* animation);
@@ -70,7 +70,7 @@ class DownloadShelfView : public DownloadShelf,
void AddDownloadView(views::View* view);
// Paints the border.
- void PaintBorder(ChromeCanvas* canvas);
+ void PaintBorder(gfx::Canvas* canvas);
// The animation for adding new items to the shelf.
scoped_ptr<SlideAnimation> new_item_animation_;
diff --git a/chrome/browser/views/find_bar_view.cc b/chrome/browser/views/find_bar_view.cc
index aa640a5..ededa28 100644
--- a/chrome/browser/views/find_bar_view.cc
+++ b/chrome/browser/views/find_bar_view.cc
@@ -6,7 +6,7 @@
#include <algorithm>
-#include "app/gfx/chrome_canvas.h"
+#include "app/gfx/canvas.h"
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "base/string_util.h"
@@ -237,7 +237,7 @@ void FindBarView::SetFocusAndSelection() {
///////////////////////////////////////////////////////////////////////////////
// FindBarView, views::View overrides:
-void FindBarView::Paint(ChromeCanvas* canvas) {
+void FindBarView::Paint(gfx::Canvas* canvas) {
SkPaint paint;
// Get the local bounds so that we now how much to stretch the background.
diff --git a/chrome/browser/views/find_bar_view.h b/chrome/browser/views/find_bar_view.h
index b87ffe1..e56af0e 100644
--- a/chrome/browser/views/find_bar_view.h
+++ b/chrome/browser/views/find_bar_view.h
@@ -56,7 +56,7 @@ class FindBarView : public views::View,
void animation_offset(int offset) { animation_offset_ = offset; }
// Overridden from views::View:
- virtual void Paint(ChromeCanvas* canvas);
+ virtual void Paint(gfx::Canvas* canvas);
virtual void Layout();
virtual gfx::Size GetPreferredSize();
virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child);
diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc
index 1af097f..4adacf9 100644
--- a/chrome/browser/views/frame/browser_view.cc
+++ b/chrome/browser/views/frame/browser_view.cc
@@ -5,7 +5,7 @@
#include "chrome/browser/views/frame/browser_view.h"
#include "app/drag_drop_types.h"
-#include "app/gfx/chrome_canvas.h"
+#include "app/gfx/canvas.h"
#include "app/l10n_util.h"
#include "app/os_exchange_data.h"
#include "app/resource_bundle.h"
@@ -138,7 +138,7 @@ class ResizeCorner : public views::View {
public:
ResizeCorner() { }
- virtual void Paint(ChromeCanvas* canvas) {
+ virtual void Paint(gfx::Canvas* canvas) {
views::WindowWin* window = GetWindow();
if (!window || (window->IsMaximized() || window->IsFullscreen()))
return;
diff --git a/chrome/browser/views/frame/glass_browser_frame_view.cc b/chrome/browser/views/frame/glass_browser_frame_view.cc
index 6eaf547..c314a9e 100644
--- a/chrome/browser/views/frame/glass_browser_frame_view.cc
+++ b/chrome/browser/views/frame/glass_browser_frame_view.cc
@@ -4,7 +4,7 @@
#include "chrome/browser/views/frame/glass_browser_frame_view.h"
-#include "app/gfx/chrome_canvas.h"
+#include "app/gfx/canvas.h"
#include "app/resource_bundle.h"
#include "app/theme_provider.h"
#include "chrome/browser/browser_theme_provider.h"
@@ -176,7 +176,7 @@ int GlassBrowserFrameView::NonClientHitTest(const gfx::Point& point) {
///////////////////////////////////////////////////////////////////////////////
// GlassBrowserFrameView, views::View overrides:
-void GlassBrowserFrameView::Paint(ChromeCanvas* canvas) {
+void GlassBrowserFrameView::Paint(gfx::Canvas* canvas) {
if (!browser_view_->IsTabStripVisible())
return; // Nothing is visible, so don't bother to paint.
@@ -216,7 +216,7 @@ int GlassBrowserFrameView::NonClientTopBorderHeight() const {
(browser_view_->IsMaximized() ? 0 : kNonClientRestoredExtraThickness);
}
-void GlassBrowserFrameView::PaintDistributorLogo(ChromeCanvas* canvas) {
+void GlassBrowserFrameView::PaintDistributorLogo(gfx::Canvas* canvas) {
// The distributor logo is only painted when the frame is not maximized and
// when we actually have a logo.
if (!frame_->IsMaximized() && distributor_logo_ &&
@@ -229,7 +229,7 @@ void GlassBrowserFrameView::PaintDistributorLogo(ChromeCanvas* canvas) {
}
}
-void GlassBrowserFrameView::PaintToolbarBackground(ChromeCanvas* canvas) {
+void GlassBrowserFrameView::PaintToolbarBackground(gfx::Canvas* canvas) {
ThemeProvider* tp = GetThemeProvider();
gfx::Rect toolbar_bounds(browser_view_->GetToolbarBounds());
@@ -261,7 +261,7 @@ void GlassBrowserFrameView::PaintToolbarBackground(ChromeCanvas* canvas) {
toolbar_bounds.right(), toolbar_bounds.y());
}
-void GlassBrowserFrameView::PaintOTRAvatar(ChromeCanvas* canvas) {
+void GlassBrowserFrameView::PaintOTRAvatar(gfx::Canvas* canvas) {
if (!browser_view_->ShouldShowOffTheRecordAvatar())
return;
@@ -273,7 +273,7 @@ void GlassBrowserFrameView::PaintOTRAvatar(ChromeCanvas* canvas) {
otr_avatar_bounds_.width(), otr_avatar_bounds_.height(), false);
}
-void GlassBrowserFrameView::PaintRestoredClientEdge(ChromeCanvas* canvas) {
+void GlassBrowserFrameView::PaintRestoredClientEdge(gfx::Canvas* canvas) {
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
// The client edges start below the toolbar upper corner images regardless
diff --git a/chrome/browser/views/frame/glass_browser_frame_view.h b/chrome/browser/views/frame/glass_browser_frame_view.h
index 3a00db3..7b999e1 100644
--- a/chrome/browser/views/frame/glass_browser_frame_view.h
+++ b/chrome/browser/views/frame/glass_browser_frame_view.h
@@ -34,7 +34,7 @@ class GlassBrowserFrameView : public BrowserNonClientFrameView {
protected:
// Overridden from views::View:
- virtual void Paint(ChromeCanvas* canvas);
+ virtual void Paint(gfx::Canvas* canvas);
virtual void Layout();
private:
@@ -51,10 +51,10 @@ class GlassBrowserFrameView : public BrowserNonClientFrameView {
int NonClientTopBorderHeight() const;
// Paint various sub-components of this view.
- void PaintDistributorLogo(ChromeCanvas* canvas);
- void PaintToolbarBackground(ChromeCanvas* canvas);
- void PaintOTRAvatar(ChromeCanvas* canvas);
- void PaintRestoredClientEdge(ChromeCanvas* canvas);
+ void PaintDistributorLogo(gfx::Canvas* canvas);
+ void PaintToolbarBackground(gfx::Canvas* canvas);
+ void PaintOTRAvatar(gfx::Canvas* canvas);
+ void PaintRestoredClientEdge(gfx::Canvas* canvas);
// Layout various sub-components of this view.
void LayoutDistributorLogo();
diff --git a/chrome/browser/views/frame/opaque_browser_frame_view.cc b/chrome/browser/views/frame/opaque_browser_frame_view.cc
index 89b50f5..29ee9d9 100644
--- a/chrome/browser/views/frame/opaque_browser_frame_view.cc
+++ b/chrome/browser/views/frame/opaque_browser_frame_view.cc
@@ -4,8 +4,8 @@
#include "chrome/browser/views/frame/opaque_browser_frame_view.h"
-#include "app/gfx/chrome_canvas.h"
-#include "app/gfx/chrome_font.h"
+#include "app/gfx/canvas.h"
+#include "app/gfx/font.h"
#include "app/gfx/path.h"
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
@@ -313,7 +313,7 @@ void OpaqueBrowserFrameView::ResetWindowControls() {
///////////////////////////////////////////////////////////////////////////////
// OpaqueBrowserFrameView, views::View overrides:
-void OpaqueBrowserFrameView::Paint(ChromeCanvas* canvas) {
+void OpaqueBrowserFrameView::Paint(gfx::Canvas* canvas) {
if (frame_->IsFullscreen())
return; // Nothing is visible, so don't bother to paint.
@@ -506,7 +506,7 @@ int OpaqueBrowserFrameView::IconSize(int* title_top_spacing_ptr,
kIconHeightFractionDenominator) / 2 * 2, kIconMinimumSize);
}
-void OpaqueBrowserFrameView::PaintRestoredFrameBorder(ChromeCanvas* canvas) {
+void OpaqueBrowserFrameView::PaintRestoredFrameBorder(gfx::Canvas* canvas) {
ThemeProvider* tp = GetThemeProvider();
SkBitmap* top_left_corner = tp->GetBitmapNamed(IDR_WINDOW_TOP_LEFT_CORNER);
@@ -603,7 +603,7 @@ void OpaqueBrowserFrameView::PaintRestoredFrameBorder(ChromeCanvas* canvas) {
}
-void OpaqueBrowserFrameView::PaintMaximizedFrameBorder(ChromeCanvas* canvas) {
+void OpaqueBrowserFrameView::PaintMaximizedFrameBorder(gfx::Canvas* canvas) {
ThemeProvider* tp = GetThemeProvider();
// Window frame mode and color
SkBitmap* theme_frame;
@@ -632,7 +632,7 @@ void OpaqueBrowserFrameView::PaintMaximizedFrameBorder(ChromeCanvas* canvas) {
}
}
-void OpaqueBrowserFrameView::PaintDistributorLogo(ChromeCanvas* canvas) {
+void OpaqueBrowserFrameView::PaintDistributorLogo(gfx::Canvas* canvas) {
// The distributor logo is only painted when the frame is not maximized and
// when we actually have a logo.
if (!frame_->IsMaximized() && distributor_logo_ &&
@@ -642,7 +642,7 @@ void OpaqueBrowserFrameView::PaintDistributorLogo(ChromeCanvas* canvas) {
}
}
-void OpaqueBrowserFrameView::PaintTitleBar(ChromeCanvas* canvas) {
+void OpaqueBrowserFrameView::PaintTitleBar(gfx::Canvas* canvas) {
// The window icon is painted by the TabIconView.
views::WindowDelegate* d = frame_->GetDelegate();
if (d->ShouldShowWindowTitle()) {
@@ -658,7 +658,7 @@ void OpaqueBrowserFrameView::PaintTitleBar(ChromeCanvas* canvas) {
}
}
-void OpaqueBrowserFrameView::PaintToolbarBackground(ChromeCanvas* canvas) {
+void OpaqueBrowserFrameView::PaintToolbarBackground(gfx::Canvas* canvas) {
if (!browser_view_->IsToolbarVisible())
return;
@@ -716,7 +716,7 @@ void OpaqueBrowserFrameView::PaintToolbarBackground(ChromeCanvas* canvas) {
toolbar_right->width(), bottom_edge_height, false);
}
-void OpaqueBrowserFrameView::PaintOTRAvatar(ChromeCanvas* canvas) {
+void OpaqueBrowserFrameView::PaintOTRAvatar(gfx::Canvas* canvas) {
if (!browser_view_->ShouldShowOffTheRecordAvatar())
return;
@@ -728,7 +728,7 @@ void OpaqueBrowserFrameView::PaintOTRAvatar(ChromeCanvas* canvas) {
otr_avatar_bounds_.width(), otr_avatar_bounds_.height(), false);
}
-void OpaqueBrowserFrameView::PaintRestoredClientEdge(ChromeCanvas* canvas) {
+void OpaqueBrowserFrameView::PaintRestoredClientEdge(gfx::Canvas* canvas) {
ThemeProvider* tp = GetThemeProvider();
int client_area_top = frame_->GetClientView()->y();
diff --git a/chrome/browser/views/frame/opaque_browser_frame_view.h b/chrome/browser/views/frame/opaque_browser_frame_view.h
index 6d16a2f..575992b 100644
--- a/chrome/browser/views/frame/opaque_browser_frame_view.h
+++ b/chrome/browser/views/frame/opaque_browser_frame_view.h
@@ -47,7 +47,7 @@ class OpaqueBrowserFrameView : public BrowserNonClientFrameView,
virtual void ResetWindowControls();
// Overridden from views::View:
- virtual void Paint(ChromeCanvas* canvas);
+ virtual void Paint(gfx::Canvas* canvas);
virtual void Layout();
virtual bool HitTest(const gfx::Point& l) const;
virtual void ViewHierarchyChanged(bool is_add,
@@ -101,13 +101,13 @@ class OpaqueBrowserFrameView : public BrowserNonClientFrameView,
// Paint various sub-components of this view. The *FrameBorder() functions
// also paint the background of the titlebar area, since the top frame border
// and titlebar background are a contiguous component.
- void PaintRestoredFrameBorder(ChromeCanvas* canvas);
- void PaintMaximizedFrameBorder(ChromeCanvas* canvas);
- void PaintDistributorLogo(ChromeCanvas* canvas);
- void PaintTitleBar(ChromeCanvas* canvas);
- void PaintToolbarBackground(ChromeCanvas* canvas);
- void PaintOTRAvatar(ChromeCanvas* canvas);
- void PaintRestoredClientEdge(ChromeCanvas* canvas);
+ void PaintRestoredFrameBorder(gfx::Canvas* canvas);
+ void PaintMaximizedFrameBorder(gfx::Canvas* canvas);
+ void PaintDistributorLogo(gfx::Canvas* canvas);
+ void PaintTitleBar(gfx::Canvas* canvas);
+ void PaintToolbarBackground(gfx::Canvas* canvas);
+ void PaintOTRAvatar(gfx::Canvas* canvas);
+ void PaintRestoredClientEdge(gfx::Canvas* canvas);
// Layout various sub-components of this view.
void LayoutWindowControls();
diff --git a/chrome/browser/views/fullscreen_exit_bubble.cc b/chrome/browser/views/fullscreen_exit_bubble.cc
index ff491a0..5f61598 100644
--- a/chrome/browser/views/fullscreen_exit_bubble.cc
+++ b/chrome/browser/views/fullscreen_exit_bubble.cc
@@ -4,7 +4,7 @@
#include "chrome/browser/views/fullscreen_exit_bubble.h"
-#include "app/gfx/chrome_canvas.h"
+#include "app/gfx/canvas.h"
#include "app/l10n_util.h"
#include "app/l10n_util_win.h"
#include "app/resource_bundle.h"
@@ -29,7 +29,7 @@ class FullscreenExitBubble::FullscreenExitView : public views::View {
// views::View
virtual void Layout();
- virtual void Paint(ChromeCanvas* canvas);
+ virtual void Paint(gfx::Canvas* canvas);
// Handle to the HWND that contains us.
views::WidgetWin* popup_;
@@ -71,7 +71,7 @@ void FullscreenExitBubble::FullscreenExitView::Layout() {
link_preferred_size.width(), link_preferred_size.height());
}
-void FullscreenExitBubble::FullscreenExitView::Paint(ChromeCanvas* canvas) {
+void FullscreenExitBubble::FullscreenExitView::Paint(gfx::Canvas* canvas) {
// Create a round-bottomed rect to fill the whole View.
CRect parent_rect;
SkRect rect;
diff --git a/chrome/browser/views/hung_renderer_view.cc b/chrome/browser/views/hung_renderer_view.cc
index 4c1397a..adc08d5 100644
--- a/chrome/browser/views/hung_renderer_view.cc
+++ b/chrome/browser/views/hung_renderer_view.cc
@@ -4,7 +4,7 @@
#include "chrome/browser/hung_renderer_dialog.h"
-#include "app/gfx/chrome_canvas.h"
+#include "app/gfx/canvas.h"
#include "app/resource_bundle.h"
#include "chrome/browser/browser_list.h"
#include "chrome/browser/renderer_host/render_process_host.h"
diff --git a/chrome/browser/views/info_bubble.cc b/chrome/browser/views/info_bubble.cc
index b31a8f6..9447285 100644
--- a/chrome/browser/views/info_bubble.cc
+++ b/chrome/browser/views/info_bubble.cc
@@ -4,7 +4,7 @@
#include "chrome/browser/views/info_bubble.h"
-#include "app/gfx/chrome_canvas.h"
+#include "app/gfx/canvas.h"
#include "app/gfx/path.h"
#include "app/resource_bundle.h"
#include "app/win_util.h"
@@ -338,7 +338,7 @@ HRGN InfoBubble::ContentView::GetMask(const CSize &size) {
return mask.CreateHRGN();
}
-void InfoBubble::ContentView::Paint(ChromeCanvas* canvas) {
+void InfoBubble::ContentView::Paint(gfx::Canvas* canvas) {
int bubble_x = 0;
int bubble_y = 0;
int bubble_w = width();
diff --git a/chrome/browser/views/info_bubble.h b/chrome/browser/views/info_bubble.h
index 7368235..2b94ba6 100644
--- a/chrome/browser/views/info_bubble.h
+++ b/chrome/browser/views/info_bubble.h
@@ -121,7 +121,7 @@ class InfoBubble : public views::WidgetWin,
HRGN GetMask(const CSize& size);
// Paints the background and arrow appropriately.
- virtual void Paint(ChromeCanvas* canvas);
+ virtual void Paint(gfx::Canvas* canvas);
// Returns true if the arrow is positioned along the top edge of the
// view. If this returns false the arrow is positioned along the bottom
diff --git a/chrome/browser/views/infobars/infobars.cc b/chrome/browser/views/infobars/infobars.cc
index f14aded..a687c8f 100644
--- a/chrome/browser/views/infobars/infobars.cc
+++ b/chrome/browser/views/infobars/infobars.cc
@@ -4,7 +4,7 @@
#include "chrome/browser/views/infobars/infobars.h"
-#include "app/gfx/chrome_canvas.h"
+#include "app/gfx/canvas.h"
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "app/slide_animation.h"
@@ -64,7 +64,7 @@ class InfoBarBackground : public views::Background {
}
// Overridden from views::View:
- virtual void Paint(ChromeCanvas* canvas, views::View* view) const {
+ virtual void Paint(gfx::Canvas* canvas, views::View* view) const {
// First paint the gradient background.
gradient_background_->Paint(canvas, view);
diff --git a/chrome/browser/views/location_bar_view.cc b/chrome/browser/views/location_bar_view.cc
index 3014dfc..415334e 100644
--- a/chrome/browser/views/location_bar_view.cc
+++ b/chrome/browser/views/location_bar_view.cc
@@ -4,7 +4,7 @@
#include "chrome/browser/views/location_bar_view.h"
-#include "app/gfx/chrome_canvas.h"
+#include "app/gfx/canvas.h"
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "app/win_util.h"
@@ -223,7 +223,7 @@ void LocationBarView::Layout() {
DoLayout(true);
}
-void LocationBarView::Paint(ChromeCanvas* canvas) {
+void LocationBarView::Paint(gfx::Canvas* canvas) {
View::Paint(canvas);
SkColor bg = SkColorSetRGB(
@@ -677,7 +677,7 @@ void LocationBarView::SelectedKeywordView::SetFont(const gfx::Font& font) {
partial_label_.SetFont(font);
}
-void LocationBarView::SelectedKeywordView::Paint(ChromeCanvas* canvas) {
+void LocationBarView::SelectedKeywordView::Paint(gfx::Canvas* canvas) {
canvas->TranslateInt(0, kBackgroundYOffset);
background_painter_.Paint(width(), height() - kTopInset, canvas);
canvas->TranslateInt(0, -kBackgroundYOffset);
@@ -795,7 +795,7 @@ void LocationBarView::KeywordHintView::SetKeyword(const std::wstring& keyword) {
}
}
-void LocationBarView::KeywordHintView::Paint(ChromeCanvas* canvas) {
+void LocationBarView::KeywordHintView::Paint(gfx::Canvas* canvas) {
int image_x = leading_label_.IsVisible() ? leading_label_.width() : 0;
// Since we paint the button image directly on the canvas (instead of using a
diff --git a/chrome/browser/views/location_bar_view.h b/chrome/browser/views/location_bar_view.h
index c0b2a9e..b0648d7 100644
--- a/chrome/browser/views/location_bar_view.h
+++ b/chrome/browser/views/location_bar_view.h
@@ -8,7 +8,7 @@
#include <string>
#include <vector>
-#include "app/gfx/chrome_font.h"
+#include "app/gfx/font.h"
#include "base/gfx/rect.h"
#include "chrome/browser/autocomplete/autocomplete_edit.h"
#include "chrome/browser/autocomplete/autocomplete_edit_view_win.h"
@@ -78,10 +78,10 @@ class LocationBarView : public LocationBar,
// Layout and Painting functions
virtual void Layout();
- virtual void Paint(ChromeCanvas* canvas);
+ virtual void Paint(gfx::Canvas* canvas);
// No focus border for the location bar, the caret is enough.
- virtual void PaintFocusBorder(ChromeCanvas* canvas) { }
+ virtual void PaintFocusBorder(gfx::Canvas* canvas) { }
// Called when any ancestor changes its size, asks the AutocompleteEditModel
// to close its popup.
@@ -149,7 +149,7 @@ class LocationBarView : public LocationBar,
void SetFont(const gfx::Font& font);
- virtual void Paint(ChromeCanvas* canvas);
+ virtual void Paint(gfx::Canvas* canvas);
virtual gfx::Size GetPreferredSize();
virtual gfx::Size GetMinimumSize();
@@ -204,7 +204,7 @@ class LocationBarView : public LocationBar,
void SetKeyword(const std::wstring& keyword);
std::wstring keyword() const { return keyword_; }
- virtual void Paint(ChromeCanvas* canvas);
+ virtual void Paint(gfx::Canvas* canvas);
virtual gfx::Size GetPreferredSize();
// The minimum size is just big enough to show the tab.
virtual gfx::Size GetMinimumSize();
diff --git a/chrome/browser/views/options/advanced_contents_view.cc b/chrome/browser/views/options/advanced_contents_view.cc
index 587bd71..a1ed601 100644
--- a/chrome/browser/views/options/advanced_contents_view.cc
+++ b/chrome/browser/views/options/advanced_contents_view.cc
@@ -12,7 +12,7 @@
#include <vsstyle.h>
#include <vssym32.h>
-#include "app/gfx/chrome_canvas.h"
+#include "app/gfx/canvas.h"
#include "app/resource_bundle.h"
#include "base/file_util.h"
#include "base/path_service.h"
@@ -62,7 +62,7 @@ class ListBackground : public views::Background {
}
virtual ~ListBackground() {}
- virtual void Paint(ChromeCanvas* canvas, views::View* view) const {
+ virtual void Paint(gfx::Canvas* canvas, views::View* view) const {
HDC dc = canvas->beginPlatformPaint();
RECT native_lb = view->GetLocalBounds(true).ToRECT();
gfx::NativeTheme::instance()->PaintListBackground(dc, true, &native_lb);
diff --git a/chrome/browser/views/options/content_page_view.cc b/chrome/browser/views/options/content_page_view.cc
index ef822ee12..77dd376 100644
--- a/chrome/browser/views/options/content_page_view.cc
+++ b/chrome/browser/views/options/content_page_view.cc
@@ -9,7 +9,7 @@
#include <vsstyle.h>
#include <vssym32.h>
-#include "app/gfx/chrome_canvas.h"
+#include "app/gfx/canvas.h"
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "base/command_line.h"
@@ -54,7 +54,7 @@ class FileDisplayArea : public views::View {
void SetFile(const FilePath& file_path);
// views::View overrides:
- virtual void Paint(ChromeCanvas* canvas);
+ virtual void Paint(gfx::Canvas* canvas);
virtual void Layout();
virtual gfx::Size GetPreferredSize();
@@ -104,7 +104,7 @@ void FileDisplayArea::SetFile(const FilePath& file_path) {
}
}
-void FileDisplayArea::Paint(ChromeCanvas* canvas) {
+void FileDisplayArea::Paint(gfx::Canvas* canvas) {
HDC dc = canvas->beginPlatformPaint();
RECT rect = { 0, 0, width(), height() };
gfx::NativeTheme::instance()->PaintTextField(
diff --git a/chrome/browser/views/options/cookies_view.cc b/chrome/browser/views/options/cookies_view.cc
index a294fff..f937c6d 100644
--- a/chrome/browser/views/options/cookies_view.cc
+++ b/chrome/browser/views/options/cookies_view.cc
@@ -6,7 +6,7 @@
#include <algorithm>
-#include "app/gfx/chrome_canvas.h"
+#include "app/gfx/canvas.h"
#include "app/gfx/color_utils.h"
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
diff --git a/chrome/browser/views/options/fonts_page_view.cc b/chrome/browser/views/options/fonts_page_view.cc
index 41cb561..3488d10 100644
--- a/chrome/browser/views/options/fonts_page_view.cc
+++ b/chrome/browser/views/options/fonts_page_view.cc
@@ -11,8 +11,8 @@
#include <vector>
-#include "app/gfx/chrome_canvas.h"
-#include "app/gfx/chrome_font.h"
+#include "app/gfx/canvas.h"
+#include "app/gfx/font.h"
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "base/file_util.h"
@@ -113,7 +113,7 @@ class FontDisplayView : public views::View {
int font_size() { return font_size_; }
// views::View overrides:
- virtual void Paint(ChromeCanvas* canvas);
+ virtual void Paint(gfx::Canvas* canvas);
virtual void Layout();
virtual gfx::Size GetPreferredSize();
@@ -175,7 +175,7 @@ void FontDisplayView::SetFontType(const std::wstring& font_name,
font_text_label_->SetText(displayed_text);
}
-void FontDisplayView::Paint(ChromeCanvas* canvas) {
+void FontDisplayView::Paint(gfx::Canvas* canvas) {
HDC dc = canvas->beginPlatformPaint();
RECT rect = { 0, 0, width(), height() };
gfx::NativeTheme::instance()->PaintTextField(
diff --git a/chrome/browser/views/options/languages_page_view.cc b/chrome/browser/views/options/languages_page_view.cc
index c65474e..c768bd6 100644
--- a/chrome/browser/views/options/languages_page_view.cc
+++ b/chrome/browser/views/options/languages_page_view.cc
@@ -8,8 +8,8 @@
#include "chrome/browser/views/options/languages_page_view.h"
-#include "app/gfx/chrome_canvas.h"
-#include "app/gfx/chrome_font.h"
+#include "app/gfx/canvas.h"
+#include "app/gfx/font.h"
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "base/file_util.h"
diff --git a/chrome/browser/views/options/options_group_view.cc b/chrome/browser/views/options/options_group_view.cc
index a8697ba..73cbf8d 100644
--- a/chrome/browser/views/options/options_group_view.cc
+++ b/chrome/browser/views/options/options_group_view.cc
@@ -7,8 +7,8 @@
#include "chrome/browser/views/options/options_group_view.h"
-#include "app/gfx/chrome_canvas.h"
-#include "app/gfx/chrome_font.h"
+#include "app/gfx/canvas.h"
+#include "app/gfx/font.h"
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "base/gfx/native_theme.h"
@@ -62,7 +62,7 @@ int OptionsGroupView::GetContentsWidth() const {
///////////////////////////////////////////////////////////////////////////////
// OptionsGroupView, views::View overrides:
-void OptionsGroupView::Paint(ChromeCanvas* canvas) {
+void OptionsGroupView::Paint(gfx::Canvas* canvas) {
if (highlighted_) {
COLORREF infocolor = GetSysColor(COLOR_INFOBK);
SkColor background_color = SkColorSetRGB(GetRValue(infocolor),
diff --git a/chrome/browser/views/options/options_group_view.h b/chrome/browser/views/options/options_group_view.h
index 1cabd1d..6d5505a1 100644
--- a/chrome/browser/views/options/options_group_view.h
+++ b/chrome/browser/views/options/options_group_view.h
@@ -34,7 +34,7 @@ class OptionsGroupView : public views::View {
protected:
// views::View overrides:
- virtual void Paint(ChromeCanvas* canvas);
+ virtual void Paint(gfx::Canvas* canvas);
virtual void ViewHierarchyChanged(bool is_add,
views::View* parent,
views::View* child);
diff --git a/chrome/browser/views/sad_tab_view.cc b/chrome/browser/views/sad_tab_view.cc
index 61a9e57..2c5ee30 100644
--- a/chrome/browser/views/sad_tab_view.cc
+++ b/chrome/browser/views/sad_tab_view.cc
@@ -4,7 +4,7 @@
#include "chrome/browser/views/sad_tab_view.h"
-#include "app/gfx/chrome_canvas.h"
+#include "app/gfx/canvas.h"
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "base/gfx/size.h"
@@ -35,7 +35,7 @@ SadTabView::SadTabView() {
InitClass();
}
-void SadTabView::Paint(ChromeCanvas* canvas) {
+void SadTabView::Paint(gfx::Canvas* canvas) {
SkPaint paint;
paint.setShader(skia::CreateGradientShader(0, height(),
kBackgroundColor,
@@ -50,12 +50,12 @@ void SadTabView::Paint(ChromeCanvas* canvas) {
canvas->DrawStringInt(title_, *title_font_, kTitleColor, title_bounds_.x(),
title_bounds_.y(), title_bounds_.width(),
title_bounds_.height(),
- ChromeCanvas::TEXT_ALIGN_CENTER);
+ gfx::Canvas::TEXT_ALIGN_CENTER);
canvas->DrawStringInt(message_, *message_font_, kMessageColor,
message_bounds_.x(), message_bounds_.y(),
message_bounds_.width(), message_bounds_.height(),
- ChromeCanvas::MULTI_LINE);
+ gfx::Canvas::MULTI_LINE);
}
void SadTabView::Layout() {
@@ -70,11 +70,11 @@ void SadTabView::Layout() {
int title_height = title_font_->height();
title_bounds_.SetRect(title_x, title_y, title_width_, title_height);
- ChromeCanvas cc(0, 0, true);
+ gfx::Canvas cc(0, 0, true);
int message_width = static_cast<int>(width() * kMessageSize);
int message_height = 0;
cc.SizeStringInt(message_, *message_font_, &message_width, &message_height,
- ChromeCanvas::MULTI_LINE);
+ gfx::Canvas::MULTI_LINE);
int message_x = (width() - message_width) / 2;
int message_y = title_bounds_.bottom() + kTitleMessageSpacing;
message_bounds_.SetRect(message_x, message_y, message_width, message_height);
diff --git a/chrome/browser/views/sad_tab_view.h b/chrome/browser/views/sad_tab_view.h
index 1a279b6..65ed6fb 100644
--- a/chrome/browser/views/sad_tab_view.h
+++ b/chrome/browser/views/sad_tab_view.h
@@ -5,7 +5,7 @@
#ifndef CHROME_BROWSER_VIEWS_SAD_TAB_VIEW_H_
#define CHROME_BROWSER_VIEWS_SAD_TAB_VIEW_H_
-#include "app/gfx/chrome_font.h"
+#include "app/gfx/font.h"
#include "base/basictypes.h"
#include "views/view.h"
@@ -32,7 +32,7 @@ class SadTabView : public views::View {
virtual ~SadTabView() {}
// Overridden from views::View:
- virtual void Paint(ChromeCanvas* canvas);
+ virtual void Paint(gfx::Canvas* canvas);
virtual void Layout();
private:
diff --git a/chrome/browser/views/shell_dialogs_win.cc b/chrome/browser/views/shell_dialogs_win.cc
index bd5d51f..b476f61 100644
--- a/chrome/browser/views/shell_dialogs_win.cc
+++ b/chrome/browser/views/shell_dialogs_win.cc
@@ -12,7 +12,7 @@
#include <algorithm>
#include <set>
-#include "app/gfx/chrome_font.h"
+#include "app/gfx/font.h"
#include "app/l10n_util.h"
#include "app/win_util.h"
#include "base/file_util.h"
diff --git a/chrome/browser/views/star_toggle.cc b/chrome/browser/views/star_toggle.cc
index 01ab0b3..0e03f91 100644
--- a/chrome/browser/views/star_toggle.cc
+++ b/chrome/browser/views/star_toggle.cc
@@ -4,7 +4,7 @@
#include "chrome/browser/views/star_toggle.h"
-#include "app/gfx/chrome_canvas.h"
+#include "app/gfx/canvas.h"
#include "app/resource_bundle.h"
#include "chrome/app/chrome_dll_resource.h"
#include "grit/theme_resources.h"
@@ -33,7 +33,7 @@ bool StarToggle::GetState() const {
return state_;
}
-void StarToggle::Paint(ChromeCanvas* canvas) {
+void StarToggle::Paint(gfx::Canvas* canvas) {
PaintFocusBorder(canvas);
canvas->DrawBitmapInt(state_ ? *state_on_ : *state_off_,
(width() - state_off_->width()) / 2,
diff --git a/chrome/browser/views/star_toggle.h b/chrome/browser/views/star_toggle.h
index 08d1791..1cfc0de 100644
--- a/chrome/browser/views/star_toggle.h
+++ b/chrome/browser/views/star_toggle.h
@@ -42,7 +42,7 @@ class StarToggle : public views::View {
void SwitchState();
// Overriden from view.
- void Paint(ChromeCanvas* canvas);
+ void Paint(gfx::Canvas* canvas);
gfx::Size GetPreferredSize();
virtual bool OnMousePressed(const views::MouseEvent& e);
virtual bool OnMouseDragged(const views::MouseEvent& event);
diff --git a/chrome/browser/views/status_bubble_views.cc b/chrome/browser/views/status_bubble_views.cc
index a0c687e..250614b 100644
--- a/chrome/browser/views/status_bubble_views.cc
+++ b/chrome/browser/views/status_bubble_views.cc
@@ -6,7 +6,7 @@
#include <algorithm>
-#include "app/gfx/chrome_canvas.h"
+#include "app/gfx/canvas.h"
#include "app/gfx/text_elider.h"
#include "app/l10n_util.h"
#include "app/l10n_util_win.h"
@@ -142,7 +142,7 @@ class StatusBubbleViews::StatusView : public views::Label,
void AnimateToState(double state);
void AnimationEnded(const Animation* animation);
- virtual void Paint(ChromeCanvas* canvas);
+ virtual void Paint(gfx::Canvas* canvas);
BubbleStage stage_;
BubbleStyle style_;
@@ -318,7 +318,7 @@ void StatusBubbleViews::StatusView::SetStyle(BubbleStyle style) {
}
}
-void StatusBubbleViews::StatusView::Paint(ChromeCanvas* canvas) {
+void StatusBubbleViews::StatusView::Paint(gfx::Canvas* canvas) {
SkPaint paint;
paint.setStyle(SkPaint::kFill_Style);
paint.setFlags(SkPaint::kAntiAlias_Flag);
diff --git a/chrome/browser/views/tab_icon_view.cc b/chrome/browser/views/tab_icon_view.cc
index 578c917..315d310 100644
--- a/chrome/browser/views/tab_icon_view.cc
+++ b/chrome/browser/views/tab_icon_view.cc
@@ -7,7 +7,7 @@
#include <windows.h>
#include <shellapi.h>
-#include "app/gfx/chrome_canvas.h"
+#include "app/gfx/canvas.h"
#include "app/gfx/favicon_size.h"
#include "app/gfx/icon_util.h"
#include "app/resource_bundle.h"
@@ -83,17 +83,17 @@ void TabIconView::Update() {
}
}
-void TabIconView::PaintThrobber(ChromeCanvas* canvas) {
+void TabIconView::PaintThrobber(gfx::Canvas* canvas) {
int image_size = g_throbber_frames->height();
PaintIcon(canvas, is_light_ ? *g_throbber_frames_light : *g_throbber_frames,
throbber_frame_ * image_size, 0, image_size, image_size, false);
}
-void TabIconView::PaintFavIcon(ChromeCanvas* canvas, const SkBitmap& bitmap) {
+void TabIconView::PaintFavIcon(gfx::Canvas* canvas, const SkBitmap& bitmap) {
PaintIcon(canvas, bitmap, 0, 0, bitmap.width(), bitmap.height(), true);
}
-void TabIconView::PaintIcon(ChromeCanvas* canvas,
+void TabIconView::PaintIcon(gfx::Canvas* canvas,
const SkBitmap& bitmap,
int src_x,
int src_y,
@@ -125,7 +125,7 @@ void TabIconView::PaintIcon(ChromeCanvas* canvas,
dest_h, filter);
}
-void TabIconView::Paint(ChromeCanvas* canvas) {
+void TabIconView::Paint(gfx::Canvas* canvas) {
bool rendered = false;
if (throbber_running_) {
diff --git a/chrome/browser/views/tab_icon_view.h b/chrome/browser/views/tab_icon_view.h
index 2860699..d25f4f9 100644
--- a/chrome/browser/views/tab_icon_view.h
+++ b/chrome/browser/views/tab_icon_view.h
@@ -39,13 +39,13 @@ class TabIconView : public views::View {
void set_is_light(bool is_light) { is_light_ = is_light; }
// Overriden from View
- virtual void Paint(ChromeCanvas* canvas);
+ virtual void Paint(gfx::Canvas* canvas);
virtual gfx::Size GetPreferredSize();
private:
- void PaintThrobber(ChromeCanvas* canvas);
- void PaintFavIcon(ChromeCanvas* canvas, const SkBitmap& bitmap);
- void PaintIcon(ChromeCanvas* canvas,
+ void PaintThrobber(gfx::Canvas* canvas);
+ void PaintFavIcon(gfx::Canvas* canvas, const SkBitmap& bitmap);
+ void PaintIcon(gfx::Canvas* canvas,
const SkBitmap& bitmap,
int src_x,
int src_y,
diff --git a/chrome/browser/views/tabs/dragged_tab_controller.cc b/chrome/browser/views/tabs/dragged_tab_controller.cc
index f56a00f..7f37ac4 100644
--- a/chrome/browser/views/tabs/dragged_tab_controller.cc
+++ b/chrome/browser/views/tabs/dragged_tab_controller.cc
@@ -8,7 +8,7 @@
#include <set>
#include "app/animation.h"
-#include "app/gfx/chrome_canvas.h"
+#include "app/gfx/canvas.h"
#include "app/resource_bundle.h"
#include "chrome/browser/browser_window.h"
#include "chrome/browser/extensions/extension_function_dispatcher.h"
@@ -51,7 +51,7 @@ class DockView : public views::View {
return gfx::Size(DockInfo::popup_width(), DockInfo::popup_height());
}
- virtual void PaintBackground(ChromeCanvas* canvas) {
+ virtual void PaintBackground(gfx::Canvas* canvas) {
SkRect outer_rect = { SkIntToScalar(0), SkIntToScalar(0),
SkIntToScalar(width()),
SkIntToScalar(height()) };
@@ -118,7 +118,7 @@ class DockView : public views::View {
}
private:
- void DrawBitmapWithAlpha(ChromeCanvas* canvas, const SkBitmap& image,
+ void DrawBitmapWithAlpha(gfx::Canvas* canvas, const SkBitmap& image,
int x, int y) {
SkPaint paint;
paint.setAlpha(128);
diff --git a/chrome/browser/views/tabs/dragged_tab_view.cc b/chrome/browser/views/tabs/dragged_tab_view.cc
index ae42710..695bcdd 100644
--- a/chrome/browser/views/tabs/dragged_tab_view.cc
+++ b/chrome/browser/views/tabs/dragged_tab_view.cc
@@ -4,7 +4,7 @@
#include "chrome/browser/views/tabs/dragged_tab_view.h"
-#include "app/gfx/chrome_canvas.h"
+#include "app/gfx/canvas.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/tabs/tab_strip_model.h"
#include "chrome/browser/views/tabs/hwnd_photobooth.h"
@@ -148,7 +148,7 @@ void DraggedTabView::AnimationCanceled(const Animation* animation) {
///////////////////////////////////////////////////////////////////////////////
// DraggedTabView, views::View overrides:
-void DraggedTabView::Paint(ChromeCanvas* canvas) {
+void DraggedTabView::Paint(gfx::Canvas* canvas) {
if (!show_contents_on_drag_) {
PaintFocusRect(canvas);
} else if (attached_) {
@@ -185,13 +185,13 @@ gfx::Size DraggedTabView::GetPreferredSize() {
////////////////////////////////////////////////////////////////////////////////
// DraggedTabView, private:
-void DraggedTabView::PaintAttachedTab(ChromeCanvas* canvas) {
+void DraggedTabView::PaintAttachedTab(gfx::Canvas* canvas) {
renderer_->ProcessPaint(canvas);
}
-void DraggedTabView::PaintDetachedView(ChromeCanvas* canvas) {
+void DraggedTabView::PaintDetachedView(gfx::Canvas* canvas) {
gfx::Size ps = GetPreferredSize();
- ChromeCanvas scale_canvas(ps.width(), ps.height(), false);
+ gfx::Canvas scale_canvas(ps.width(), ps.height(), false);
SkBitmap& bitmap_device = const_cast<SkBitmap&>(
scale_canvas.getTopPlatformDevice().accessBitmap(true));
bitmap_device.eraseARGB(0, 0, 0, 0);
@@ -236,7 +236,7 @@ void DraggedTabView::PaintDetachedView(ChromeCanvas* canvas) {
canvas->drawRect(rc, paint);
}
-void DraggedTabView::PaintFocusRect(ChromeCanvas* canvas) {
+void DraggedTabView::PaintFocusRect(gfx::Canvas* canvas) {
gfx::Size ps = GetPreferredSize();
canvas->DrawFocusRect(0, 0,
static_cast<int>(ps.width() * kScalingFactor),
diff --git a/chrome/browser/views/tabs/dragged_tab_view.h b/chrome/browser/views/tabs/dragged_tab_view.h
index 1ee9d25..504681b 100644
--- a/chrome/browser/views/tabs/dragged_tab_view.h
+++ b/chrome/browser/views/tabs/dragged_tab_view.h
@@ -59,18 +59,18 @@ class DraggedTabView : public views::View,
virtual void AnimationCanceled(const Animation* animation);
// Overridden from views::View:
- virtual void Paint(ChromeCanvas* canvas);
+ virtual void Paint(gfx::Canvas* canvas);
virtual void Layout();
virtual gfx::Size GetPreferredSize();
// Paint the view, when it's attached to a TabStrip.
- void PaintAttachedTab(ChromeCanvas* canvas);
+ void PaintAttachedTab(gfx::Canvas* canvas);
// Paint the view, when it's not attached to any TabStrip.
- void PaintDetachedView(ChromeCanvas* canvas);
+ void PaintDetachedView(gfx::Canvas* canvas);
// Paint the view, when "Show window contents while dragging" is disabled.
- void PaintFocusRect(ChromeCanvas* canvas);
+ void PaintFocusRect(gfx::Canvas* canvas);
// Resizes the container to fit the content for the current attachment mode.
void ResizeContainer();
diff --git a/chrome/browser/views/tabs/hwnd_photobooth.cc b/chrome/browser/views/tabs/hwnd_photobooth.cc
index 79de995..c51473c 100644
--- a/chrome/browser/views/tabs/hwnd_photobooth.cc
+++ b/chrome/browser/views/tabs/hwnd_photobooth.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "app/gfx/chrome_canvas.h"
+#include "app/gfx/canvas.h"
#include "base/gfx/point.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/views/tabs/hwnd_photobooth.h"
@@ -78,7 +78,7 @@ void HWNDPhotobooth::ReplaceHWND(HWND new_hwnd) {
}
void HWNDPhotobooth::PaintScreenshotIntoCanvas(
- ChromeCanvas* canvas,
+ gfx::Canvas* canvas,
const gfx::Rect& target_bounds) {
// Our contained window may have been re-parented. Make sure it belongs to
// us until someone calls ReplaceHWND(NULL).
diff --git a/chrome/browser/views/tabs/hwnd_photobooth.h b/chrome/browser/views/tabs/hwnd_photobooth.h
index e621e24..c3ef430 100644
--- a/chrome/browser/views/tabs/hwnd_photobooth.h
+++ b/chrome/browser/views/tabs/hwnd_photobooth.h
@@ -8,7 +8,9 @@
#include "base/basictypes.h"
#include "base/gfx/rect.h"
-class ChromeCanvas;
+namespace gfx {
+class Canvas;
+}
namespace views {
class WidgetWin;
}
@@ -42,7 +44,7 @@ class HWNDPhotobooth {
// Paints the current display image of the window into |canvas|, clipped to
// |target_bounds|.
- void PaintScreenshotIntoCanvas(ChromeCanvas* canvas,
+ void PaintScreenshotIntoCanvas(gfx::Canvas* canvas,
const gfx::Rect& target_bounds);
private:
diff --git a/chrome/browser/views/tabs/tab.cc b/chrome/browser/views/tabs/tab.cc
index bf606d5..d5aa9a3 100644
--- a/chrome/browser/views/tabs/tab.cc
+++ b/chrome/browser/views/tabs/tab.cc
@@ -4,7 +4,7 @@
#include "chrome/browser/views/tabs/tab.h"
-#include "app/gfx/chrome_canvas.h"
+#include "app/gfx/canvas.h"
#include "app/gfx/path.h"
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
diff --git a/chrome/browser/views/tabs/tab_renderer.cc b/chrome/browser/views/tabs/tab_renderer.cc
index 6954055..c27ece6 100644
--- a/chrome/browser/views/tabs/tab_renderer.cc
+++ b/chrome/browser/views/tabs/tab_renderer.cc
@@ -6,8 +6,8 @@
#include <limits>
-#include "app/gfx/chrome_canvas.h"
-#include "app/gfx/chrome_font.h"
+#include "app/gfx/canvas.h"
+#include "app/gfx/font.h"
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "app/win_util.h"
@@ -367,7 +367,7 @@ std::wstring TabRenderer::GetTitle() const {
////////////////////////////////////////////////////////////////////////////////
// TabRenderer, views::View overrides:
-void TabRenderer::Paint(ChromeCanvas* canvas) {
+void TabRenderer::Paint(gfx::Canvas* canvas) {
// Don't paint if we're narrower than we can render correctly. (This should
// only happen during animations).
if (width() < GetMinimumUnselectedSize().width())
@@ -555,7 +555,7 @@ void TabRenderer::AnimationEnded(const Animation* animation) {
////////////////////////////////////////////////////////////////////////////////
// TabRenderer, private
-void TabRenderer::PaintTabBackground(ChromeCanvas* canvas) {
+void TabRenderer::PaintTabBackground(gfx::Canvas* canvas) {
if (IsSelected()) {
// Sometimes detaching a tab quickly can result in the model reporting it
// as not being selected, so is_drag_clone_ ensures that we always paint
@@ -581,7 +581,7 @@ void TabRenderer::PaintTabBackground(ChromeCanvas* canvas) {
}
}
-void TabRenderer::PaintInactiveTabBackground(ChromeCanvas* canvas) {
+void TabRenderer::PaintInactiveTabBackground(gfx::Canvas* canvas) {
bool is_otr = data_.off_the_record;
// The tab image needs to be lined up with the background image
@@ -638,7 +638,7 @@ void TabRenderer::PaintInactiveTabBackground(ChromeCanvas* canvas) {
width() - tab_inactive.r_width, 0);
}
-void TabRenderer::PaintActiveTabBackground(ChromeCanvas* canvas) {
+void TabRenderer::PaintActiveTabBackground(gfx::Canvas* canvas) {
int offset = GetX(views::View::APPLY_MIRRORING_TRANSFORMATION) + 1;
ThemeProvider* tp = GetThemeProvider();
if (!tp)
@@ -674,7 +674,7 @@ void TabRenderer::PaintActiveTabBackground(ChromeCanvas* canvas) {
canvas->DrawBitmapInt(*tab_active.image_r, width() - tab_active.r_width, 0);
}
-void TabRenderer::PaintHoverTabBackground(ChromeCanvas* canvas,
+void TabRenderer::PaintHoverTabBackground(gfx::Canvas* canvas,
double opacity) {
bool is_otr = data_.off_the_record;
SkBitmap left = skia::ImageOperations::CreateBlendedBitmap(
@@ -690,7 +690,7 @@ void TabRenderer::PaintHoverTabBackground(ChromeCanvas* canvas,
canvas->DrawBitmapInt(right, width() - tab_active.r_width, 0);
}
-void TabRenderer::PaintLoadingAnimation(ChromeCanvas* canvas) {
+void TabRenderer::PaintLoadingAnimation(gfx::Canvas* canvas) {
SkBitmap* frames = (animation_state_ == ANIMATION_WAITING) ?
waiting_animation_frames : loading_animation_frames;
int image_size = frames->height();
diff --git a/chrome/browser/views/tabs/tab_renderer.h b/chrome/browser/views/tabs/tab_renderer.h
index d278fb5..26dc4cd 100644
--- a/chrome/browser/views/tabs/tab_renderer.h
+++ b/chrome/browser/views/tabs/tab_renderer.h
@@ -92,7 +92,7 @@ class TabRenderer : public views::View,
private:
// Overridden from views::View:
- virtual void Paint(ChromeCanvas* canvas);
+ virtual void Paint(gfx::Canvas* canvas);
virtual void Layout();
virtual void OnMouseEntered(const views::MouseEvent& event);
virtual void OnMouseExited(const views::MouseEvent& event);
@@ -117,11 +117,11 @@ class TabRenderer : public views::View,
void ResetCrashedFavIcon();
// Paint various portions of the Tab
- void PaintTabBackground(ChromeCanvas* canvas);
- void PaintInactiveTabBackground(ChromeCanvas* canvas);
- void PaintActiveTabBackground(ChromeCanvas* canvas);
- void PaintHoverTabBackground(ChromeCanvas* canvas, double opacity);
- void PaintLoadingAnimation(ChromeCanvas* canvas);
+ void PaintTabBackground(gfx::Canvas* canvas);
+ void PaintInactiveTabBackground(gfx::Canvas* canvas);
+ void PaintActiveTabBackground(gfx::Canvas* canvas);
+ void PaintHoverTabBackground(gfx::Canvas* canvas, double opacity);
+ void PaintLoadingAnimation(gfx::Canvas* canvas);
// Returns the number of favicon-size elements that can fit in the tab's
// current size.
diff --git a/chrome/browser/views/tabs/tab_strip.cc b/chrome/browser/views/tabs/tab_strip.cc
index 7d2a441..2ffcfd6 100644
--- a/chrome/browser/views/tabs/tab_strip.cc
+++ b/chrome/browser/views/tabs/tab_strip.cc
@@ -5,7 +5,7 @@
#include "chrome/browser/views/tabs/tab_strip.h"
#include "app/drag_drop_types.h"
-#include "app/gfx/chrome_canvas.h"
+#include "app/gfx/canvas.h"
#include "app/gfx/path.h"
#include "app/l10n_util.h"
#include "app/os_exchange_data.h"
@@ -586,7 +586,7 @@ void TabStrip::UpdateLoadingAnimations() {
///////////////////////////////////////////////////////////////////////////////
// TabStrip, views::View overrides:
-void TabStrip::PaintChildren(ChromeCanvas* canvas) {
+void TabStrip::PaintChildren(gfx::Canvas* canvas) {
// Paint the tabs in reverse order, so they stack to the left.
Tab* selected_tab = NULL;
for (int i = GetTabCount() - 1; i >= 0; --i) {
diff --git a/chrome/browser/views/tabs/tab_strip.h b/chrome/browser/views/tabs/tab_strip.h
index 86cd181..2c1cc23 100644
--- a/chrome/browser/views/tabs/tab_strip.h
+++ b/chrome/browser/views/tabs/tab_strip.h
@@ -90,7 +90,7 @@ class TabStrip : public views::View,
void UpdateLoadingAnimations();
// views::View overrides:
- virtual void PaintChildren(ChromeCanvas* canvas);
+ virtual void PaintChildren(gfx::Canvas* canvas);
virtual views::View* GetViewByID(int id) const;
virtual void Layout();
virtual gfx::Size GetPreferredSize();
diff --git a/chrome/browser/views/theme_helpers.cc b/chrome/browser/views/theme_helpers.cc
index af863f8..46b6172 100644
--- a/chrome/browser/views/theme_helpers.cc
+++ b/chrome/browser/views/theme_helpers.cc
@@ -8,7 +8,7 @@
#include <atlapp.h>
#include <atltheme.h>
-#include "app/gfx/chrome_canvas.h"
+#include "app/gfx/canvas.h"
#include "base/logging.h"
#include "skia/ext/bitmap_platform_device_win.h"
#include "SkGradientShader.h"
@@ -23,7 +23,7 @@ void GetRebarGradientColors(int width, int x1, int x2,
// those so calling code can use them to create gradient brushes for use in
// rendering in other directions.
- ChromeCanvas canvas(width, 1, true);
+ gfx::Canvas canvas(width, 1, true);
// Render the Rebar gradient into the DIB
CTheme theme;
diff --git a/chrome/browser/views/toolbar_view.cc b/chrome/browser/views/toolbar_view.cc
index f1ae818..f120cd4 100644
--- a/chrome/browser/views/toolbar_view.cc
+++ b/chrome/browser/views/toolbar_view.cc
@@ -7,7 +7,7 @@
#include <string>
#include "app/drag_drop_types.h"
-#include "app/gfx/chrome_canvas.h"
+#include "app/gfx/canvas.h"
#include "app/l10n_util.h"
#include "app/os_exchange_data.h"
#include "app/resource_bundle.h"
@@ -403,7 +403,7 @@ void BrowserToolbarView::Layout() {
app_menu_->SetBounds(next_menu_x, child_y, app_menu_width, child_height);
}
-void BrowserToolbarView::Paint(ChromeCanvas* canvas) {
+void BrowserToolbarView::Paint(gfx::Canvas* canvas) {
View::Paint(canvas);
if (IsDisplayModeNormal())
diff --git a/chrome/browser/views/toolbar_view.h b/chrome/browser/views/toolbar_view.h
index 64feb34..9242466b 100644
--- a/chrome/browser/views/toolbar_view.h
+++ b/chrome/browser/views/toolbar_view.h
@@ -54,7 +54,7 @@ class BrowserToolbarView : public views::View,
// views::View
virtual void Layout();
- virtual void Paint(ChromeCanvas* canvas);
+ virtual void Paint(gfx::Canvas* canvas);
virtual void DidGainFocus();
virtual void WillLoseFocus();
virtual bool OnKeyPressed(const views::KeyEvent& e);