summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/chromeos/frame/bubble_frame_view.cc4
-rw-r--r--chrome/browser/chromeos/frame/bubble_frame_view.h2
-rw-r--r--chrome/browser/chromeos/login/background_view.cc4
-rw-r--r--chrome/browser/chromeos/login/background_view.h2
-rw-r--r--chrome/browser/chromeos/login/network_selection_view.cc2
-rw-r--r--chrome/browser/chromeos/login/oobe_progress_bar.cc2
-rw-r--r--chrome/browser/chromeos/login/oobe_progress_bar.h2
-rw-r--r--chrome/browser/chromeos/login/username_view.cc2
-rw-r--r--chrome/browser/chromeos/login/username_view.h2
-rw-r--r--chrome/browser/chromeos/panels/panel_scroller_container.cc2
-rw-r--r--chrome/browser/chromeos/panels/panel_scroller_container.h2
-rw-r--r--chrome/browser/chromeos/panels/panel_scroller_header.cc2
-rw-r--r--chrome/browser/chromeos/panels/panel_scroller_header.h2
-rw-r--r--chrome/browser/chromeos/setting_level_bubble_view.cc4
-rw-r--r--chrome/browser/chromeos/setting_level_bubble_view.h2
-rw-r--r--chrome/browser/chromeos/status/status_area_button.cc4
-rw-r--r--chrome/browser/chromeos/status/status_area_button.h2
-rw-r--r--chrome/browser/chromeos/views/dropdown_button.cc2
-rw-r--r--chrome/browser/chromeos/views/dropdown_button.h2
-rw-r--r--chrome/browser/ui/touch/tabs/touch_tab.cc2
-rw-r--r--chrome/browser/ui/touch/tabs/touch_tab.h2
-rw-r--r--chrome/browser/ui/views/about_chrome_view.cc4
-rw-r--r--chrome/browser/ui/views/about_chrome_view.h2
-rw-r--r--chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc10
-rw-r--r--chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.h4
-rw-r--r--chrome/browser/ui/views/browser_actions_container.cc2
-rw-r--r--chrome/browser/ui/views/browser_actions_container.h2
-rw-r--r--chrome/browser/ui/views/constrained_window_win.cc4
-rw-r--r--chrome/browser/ui/views/create_application_shortcut_view.cc4
-rw-r--r--chrome/browser/ui/views/default_search_view.cc2
-rw-r--r--chrome/browser/ui/views/default_search_view.h2
-rw-r--r--chrome/browser/ui/views/download_item_view.cc2
-rw-r--r--chrome/browser/ui/views/download_item_view.h2
-rw-r--r--chrome/browser/ui/views/download_shelf_view.cc8
-rw-r--r--chrome/browser/ui/views/download_shelf_view.h4
-rw-r--r--chrome/browser/ui/views/find_bar_view.cc2
-rw-r--r--chrome/browser/ui/views/find_bar_view.h2
-rw-r--r--chrome/browser/ui/views/first_run_search_engine_view.cc2
-rw-r--r--chrome/browser/ui/views/first_run_search_engine_view.h2
-rw-r--r--chrome/browser/ui/views/frame/app_panel_browser_frame_view.cc2
-rw-r--r--chrome/browser/ui/views/frame/app_panel_browser_frame_view.h2
-rw-r--r--chrome/browser/ui/views/frame/glass_browser_frame_view.cc2
-rw-r--r--chrome/browser/ui/views/frame/glass_browser_frame_view.h2
-rw-r--r--chrome/browser/ui/views/frame/opaque_browser_frame_view.cc2
-rw-r--r--chrome/browser/ui/views/frame/opaque_browser_frame_view.h2
-rw-r--r--chrome/browser/ui/views/fullscreen_exit_bubble.cc4
-rw-r--r--chrome/browser/ui/views/info_bubble.cc4
-rw-r--r--chrome/browser/ui/views/info_bubble.h2
-rw-r--r--chrome/browser/ui/views/infobars/translate_infobar_base.cc2
-rw-r--r--chrome/browser/ui/views/infobars/translate_infobar_base.h2
-rw-r--r--chrome/browser/ui/views/location_bar/content_setting_image_view.cc8
-rw-r--r--chrome/browser/ui/views/location_bar/content_setting_image_view.h4
-rw-r--r--chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc2
-rw-r--r--chrome/browser/ui/views/location_bar/icon_label_bubble_view.h2
-rw-r--r--chrome/browser/ui/views/location_bar/keyword_hint_view.cc2
-rw-r--r--chrome/browser/ui/views/location_bar/keyword_hint_view.h2
-rw-r--r--chrome/browser/ui/views/location_bar/location_bar_view.cc6
-rw-r--r--chrome/browser/ui/views/location_bar/location_bar_view.h4
-rw-r--r--chrome/browser/ui/views/location_bar/suggested_text_view.cc2
-rw-r--r--chrome/browser/ui/views/location_bar/suggested_text_view.h2
-rw-r--r--chrome/browser/ui/views/notifications/balloon_view.cc6
-rw-r--r--chrome/browser/ui/views/notifications/balloon_view.h2
-rw-r--r--chrome/browser/ui/views/options/advanced_contents_view.cc4
-rw-r--r--chrome/browser/ui/views/options/fonts_page_view.cc4
-rw-r--r--chrome/browser/ui/views/options/options_group_view.cc2
-rw-r--r--chrome/browser/ui/views/options/options_group_view.h2
-rw-r--r--chrome/browser/ui/views/sad_tab_view.cc2
-rw-r--r--chrome/browser/ui/views/sad_tab_view.h2
-rw-r--r--chrome/browser/ui/views/status_bubble_views.cc4
-rw-r--r--chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc2
-rw-r--r--chrome/browser/ui/views/tab_icon_view.cc2
-rw-r--r--chrome/browser/ui/views/tab_icon_view.h4
-rw-r--r--chrome/browser/ui/views/tabs/dragged_tab_controller.cc2
-rw-r--r--chrome/browser/ui/views/tabs/dragged_tab_view.cc2
-rw-r--r--chrome/browser/ui/views/tabs/dragged_tab_view.h2
-rw-r--r--chrome/browser/ui/views/tabs/side_tab.cc2
-rw-r--r--chrome/browser/ui/views/tabs/side_tab.h2
-rw-r--r--chrome/browser/ui/views/tabs/tab.cc6
-rw-r--r--chrome/browser/ui/views/tabs/tab.h2
-rw-r--r--chrome/browser/ui/views/theme_install_bubble_view.cc2
-rw-r--r--chrome/browser/ui/views/theme_install_bubble_view.h2
-rw-r--r--chrome/browser/ui/views/toolbar_view.cc6
-rw-r--r--chrome/browser/ui/views/toolbar_view.h2
-rw-r--r--views/background.h2
-rw-r--r--views/controls/button/checkbox.cc2
-rw-r--r--views/controls/button/checkbox.h2
-rw-r--r--views/controls/button/image_button.cc8
-rw-r--r--views/controls/button/image_button.h2
-rw-r--r--views/controls/button/menu_button.cc2
-rw-r--r--views/controls/button/native_button.cc4
-rw-r--r--views/controls/button/native_button.h2
-rw-r--r--views/controls/button/text_button.cc10
-rw-r--r--views/controls/button/text_button.h2
-rw-r--r--views/controls/combobox/combobox.cc4
-rw-r--r--views/controls/combobox/combobox.h2
-rw-r--r--views/controls/image_view.cc4
-rw-r--r--views/controls/image_view.h2
-rw-r--r--views/controls/label.cc6
-rw-r--r--views/controls/label.h4
-rw-r--r--views/controls/menu/menu_item_view.cc2
-rw-r--r--views/controls/menu/menu_item_view.h2
-rw-r--r--views/controls/menu/menu_scroll_view_container.cc4
-rw-r--r--views/controls/menu/menu_scroll_view_container.h2
-rw-r--r--views/controls/menu/menu_separator.h2
-rw-r--r--views/controls/menu/menu_separator_gtk.cc2
-rw-r--r--views/controls/menu/menu_separator_win.cc2
-rw-r--r--views/controls/native/native_view_host.cc4
-rw-r--r--views/controls/native/native_view_host.h2
-rw-r--r--views/controls/native_control.cc2
-rw-r--r--views/controls/native_control.h2
-rw-r--r--views/controls/progress_bar.cc2
-rw-r--r--views/controls/progress_bar.h2
-rw-r--r--views/controls/scrollbar/bitmap_scroll_bar.cc2
-rw-r--r--views/controls/scrollbar/bitmap_scroll_bar.h2
-rw-r--r--views/controls/slider/slider.cc4
-rw-r--r--views/controls/slider/slider.h2
-rw-r--r--views/controls/tabbed_pane/tabbed_pane.cc4
-rw-r--r--views/controls/tabbed_pane/tabbed_pane.h2
-rw-r--r--views/controls/table/table_view2.cc4
-rw-r--r--views/controls/table/table_view2.h2
-rw-r--r--views/controls/textfield/gtk_views_entry.cc2
-rw-r--r--views/controls/textfield/native_textfield_views.cc6
-rw-r--r--views/controls/textfield/native_textfield_views.h2
-rw-r--r--views/controls/textfield/textfield.cc4
-rw-r--r--views/controls/textfield/textfield.h2
-rw-r--r--views/controls/throbber.cc6
-rw-r--r--views/controls/throbber.h4
-rw-r--r--views/view.cc16
-rw-r--r--views/view.h38
-rw-r--r--views/window/custom_frame_view.cc2
-rw-r--r--views/window/custom_frame_view.h2
-rw-r--r--views/window/dialog_client_view.cc2
-rw-r--r--views/window/dialog_client_view.h2
133 files changed, 214 insertions, 220 deletions
diff --git a/chrome/browser/chromeos/frame/bubble_frame_view.cc b/chrome/browser/chromeos/frame/bubble_frame_view.cc
index 8dc0f7f..29d2b32 100644
--- a/chrome/browser/chromeos/frame/bubble_frame_view.cc
+++ b/chrome/browser/chromeos/frame/bubble_frame_view.cc
@@ -202,7 +202,7 @@ void BubbleFrameView::Layout() {
std::max(0, height() - top_height - insets.bottom()));
}
-void BubbleFrameView::Paint(gfx::Canvas* canvas) {
+void BubbleFrameView::OnPaint(gfx::Canvas* canvas) {
// The border of this view creates an anti-aliased round-rect region for the
// contents, which we need to fill with the background color.
SkPaint paint;
@@ -218,7 +218,7 @@ void BubbleFrameView::Paint(gfx::Canvas* canvas) {
path.addRoundRect(rect, radius, radius);
canvas->AsCanvasSkia()->drawPath(path, paint);
- PaintBorder(canvas);
+ OnPaintBorder(canvas);
}
void BubbleFrameView::ButtonPressed(views::Button* sender,
diff --git a/chrome/browser/chromeos/frame/bubble_frame_view.h b/chrome/browser/chromeos/frame/bubble_frame_view.h
index dd32530..1c017f3 100644
--- a/chrome/browser/chromeos/frame/bubble_frame_view.h
+++ b/chrome/browser/chromeos/frame/bubble_frame_view.h
@@ -46,7 +46,7 @@ class BubbleFrameView : public views::NonClientFrameView,
virtual gfx::Insets GetInsets() const;
virtual gfx::Size GetPreferredSize();
virtual void Layout();
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
// Overridden from views::ButtonListener:
virtual void ButtonPressed(views::Button* sender,
diff --git a/chrome/browser/chromeos/login/background_view.cc b/chrome/browser/chromeos/login/background_view.cc
index dae33363..53c8760 100644
--- a/chrome/browser/chromeos/login/background_view.cc
+++ b/chrome/browser/chromeos/login/background_view.cc
@@ -248,8 +248,8 @@ bool BackgroundView::ScreenSaverEnabled() {
///////////////////////////////////////////////////////////////////////////////
// BackgroundView protected:
-void BackgroundView::Paint(gfx::Canvas* canvas) {
- views::View::Paint(canvas);
+void BackgroundView::OnPaint(gfx::Canvas* canvas) {
+ views::View::OnPaint(canvas);
if (!did_paint_) {
did_paint_ = true;
UpdateWindowType();
diff --git a/chrome/browser/chromeos/login/background_view.h b/chrome/browser/chromeos/login/background_view.h
index 795dd3a..d3d5e30 100644
--- a/chrome/browser/chromeos/login/background_view.h
+++ b/chrome/browser/chromeos/login/background_view.h
@@ -100,7 +100,7 @@ class BackgroundView : public views::View,
protected:
// Overridden from views::View:
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
virtual void Layout();
virtual void ChildPreferredSizeChanged(View* child);
virtual void OnLocaleChanged();
diff --git a/chrome/browser/chromeos/login/network_selection_view.cc b/chrome/browser/chromeos/login/network_selection_view.cc
index 87c2f375..fdd3968 100644
--- a/chrome/browser/chromeos/login/network_selection_view.cc
+++ b/chrome/browser/chromeos/login/network_selection_view.cc
@@ -64,7 +64,7 @@ const int kControlPaddingRow = 15;
const int kSelectionBoxHeight = 29;
// Menu button is drawn using our custom icons in resources. See
-// TextButtonBorder::Paint() for details. So this offset compensate
+// TextButtonBorder::OnPaint() for details. So this offset compensate
// horizontal size, eaten by those icons.
const int kMenuHorizontalOffset = -3;
diff --git a/chrome/browser/chromeos/login/oobe_progress_bar.cc b/chrome/browser/chromeos/login/oobe_progress_bar.cc
index 1f0c482..a810c58 100644
--- a/chrome/browser/chromeos/login/oobe_progress_bar.cc
+++ b/chrome/browser/chromeos/login/oobe_progress_bar.cc
@@ -52,7 +52,7 @@ void OobeProgressBar::InitClass() {
}
}
-void OobeProgressBar::Paint(gfx::Canvas* canvas) {
+void OobeProgressBar::OnPaint(gfx::Canvas* canvas) {
gfx::Rect bounds = GetContentsBounds();
int x = bounds.x();
diff --git a/chrome/browser/chromeos/login/oobe_progress_bar.h b/chrome/browser/chromeos/login/oobe_progress_bar.h
index b576b7e..c97edf5 100644
--- a/chrome/browser/chromeos/login/oobe_progress_bar.h
+++ b/chrome/browser/chromeos/login/oobe_progress_bar.h
@@ -25,7 +25,7 @@ class OobeProgressBar : public views::View {
explicit OobeProgressBar(const std::vector<int>& steps);
// Overridden from View:
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
// Set the current step for the progress bar. Must be one of the steps
// passed in the constructor.
diff --git a/chrome/browser/chromeos/login/username_view.cc b/chrome/browser/chromeos/login/username_view.cc
index db22e2b..e52c6f0 100644
--- a/chrome/browser/chromeos/login/username_view.cc
+++ b/chrome/browser/chromeos/login/username_view.cc
@@ -80,7 +80,7 @@ UsernameView::UsernameView(const std::wstring& username, bool use_small_shape)
is_guest_(username.empty()) {
}
-void UsernameView::Paint(gfx::Canvas* canvas) {
+void UsernameView::OnPaint(gfx::Canvas* canvas) {
gfx::Rect bounds = GetContentsBounds();
if (text_image_ == NULL)
PaintUsername(bounds);
diff --git a/chrome/browser/chromeos/login/username_view.h b/chrome/browser/chromeos/login/username_view.h
index 12ec105..5c5f3db 100644
--- a/chrome/browser/chromeos/login/username_view.h
+++ b/chrome/browser/chromeos/login/username_view.h
@@ -37,7 +37,7 @@ class UsernameView : public views::Label {
UsernameView(const std::wstring& username, bool use_small_shape);
// Overriden from views::Label.
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
// True indicates that this UsernameView is used for a user pod not
// currently selected.
diff --git a/chrome/browser/chromeos/panels/panel_scroller_container.cc b/chrome/browser/chromeos/panels/panel_scroller_container.cc
index e3b3caf..a3a5de1 100644
--- a/chrome/browser/chromeos/panels/panel_scroller_container.cc
+++ b/chrome/browser/chromeos/panels/panel_scroller_container.cc
@@ -25,6 +25,6 @@ gfx::Size PanelScrollerContainer::GetPreferredSize() {
void PanelScrollerContainer::Layout() {
}
-void PanelScrollerContainer::Paint(gfx::Canvas* canvas) {
+void PanelScrollerContainer::OnPaint(gfx::Canvas* canvas) {
canvas->DrawLineInt(0xFF000080, 0, 0, size().width(), size().height());
}
diff --git a/chrome/browser/chromeos/panels/panel_scroller_container.h b/chrome/browser/chromeos/panels/panel_scroller_container.h
index 76cca15..5ff9a09 100644
--- a/chrome/browser/chromeos/panels/panel_scroller_container.h
+++ b/chrome/browser/chromeos/panels/panel_scroller_container.h
@@ -23,7 +23,7 @@ class PanelScrollerContainer : public views::View {
// view::View overrides.
virtual gfx::Size GetPreferredSize();
virtual void Layout();
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
private:
// Non-owning pointer to our parent scroller object.
diff --git a/chrome/browser/chromeos/panels/panel_scroller_header.cc b/chrome/browser/chromeos/panels/panel_scroller_header.cc
index 0a8cac0..6257447 100644
--- a/chrome/browser/chromeos/panels/panel_scroller_header.cc
+++ b/chrome/browser/chromeos/panels/panel_scroller_header.cc
@@ -35,7 +35,7 @@ gfx::Size PanelScrollerHeader::GetPreferredSize() {
return gfx::Size(size().width(), 18);
}
-void PanelScrollerHeader::Paint(gfx::Canvas* canvas) {
+void PanelScrollerHeader::OnPaint(gfx::Canvas* canvas) {
// TODO(brettw) fill this out with real styling.
canvas->FillRectInt(0xFFFFFFFF, 0, 0, size().width(), size().height());
canvas->DrawLineInt(0xFFE6E6E6, 0, size().height() - 1,
diff --git a/chrome/browser/chromeos/panels/panel_scroller_header.h b/chrome/browser/chromeos/panels/panel_scroller_header.h
index fe4d7d4..50c816e 100644
--- a/chrome/browser/chromeos/panels/panel_scroller_header.h
+++ b/chrome/browser/chromeos/panels/panel_scroller_header.h
@@ -24,7 +24,7 @@ class PanelScrollerHeader : public views::View {
virtual bool OnMouseDragged(const views::MouseEvent& event);
virtual void OnMouseReleased(const views::MouseEvent& event, bool canceled);
virtual gfx::Size GetPreferredSize();
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
private:
// Non-owning pointer to our parent scroller object.
diff --git a/chrome/browser/chromeos/setting_level_bubble_view.cc b/chrome/browser/chromeos/setting_level_bubble_view.cc
index c4691af..1e26453 100644
--- a/chrome/browser/chromeos/setting_level_bubble_view.cc
+++ b/chrome/browser/chromeos/setting_level_bubble_view.cc
@@ -52,8 +52,8 @@ void SettingLevelBubbleView::Update(int level_percent) {
progress_bar_->SetProgress(level_percent);
}
-void SettingLevelBubbleView::Paint(gfx::Canvas* canvas) {
- views::View::Paint(canvas);
+void SettingLevelBubbleView::OnPaint(gfx::Canvas* canvas) {
+ views::View::OnPaint(canvas);
canvas->DrawBitmapInt(*icon_, kPadding, (height() - icon_->height()) / 2);
}
diff --git a/chrome/browser/chromeos/setting_level_bubble_view.h b/chrome/browser/chromeos/setting_level_bubble_view.h
index 519fef8..6fa8048 100644
--- a/chrome/browser/chromeos/setting_level_bubble_view.h
+++ b/chrome/browser/chromeos/setting_level_bubble_view.h
@@ -34,7 +34,7 @@ class SettingLevelBubbleView : public views::View {
void Update(int level_percent);
// views::View implementation:
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
virtual void Layout();
virtual gfx::Size GetPreferredSize();
diff --git a/chrome/browser/chromeos/status/status_area_button.cc b/chrome/browser/chromeos/status/status_area_button.cc
index ca40163..a864efa 100644
--- a/chrome/browser/chromeos/status/status_area_button.cc
+++ b/chrome/browser/chromeos/status/status_area_button.cc
@@ -30,7 +30,7 @@ StatusAreaButton::StatusAreaButton(views::ViewMenuDelegate* menu_delegate)
SetTextHaloColor(kStatusTextHaloColor);
}
-void StatusAreaButton::Paint(gfx::Canvas* canvas, bool for_drag) {
+void StatusAreaButton::OnPaint(gfx::Canvas* canvas, bool for_drag) {
if (state() == BS_PUSHED) {
// Apply 10% white when pushed down.
canvas->FillRectInt(SkColorSetARGB(0x19, 0xFF, 0xFF, 0xFF),
@@ -41,7 +41,7 @@ void StatusAreaButton::Paint(gfx::Canvas* canvas, bool for_drag) {
views::MenuButton::Paint(canvas, for_drag);
} else {
DrawIcon(canvas);
- PaintFocusBorder(canvas);
+ OnPaintFocusBorder(canvas);
}
}
diff --git a/chrome/browser/chromeos/status/status_area_button.h b/chrome/browser/chromeos/status/status_area_button.h
index db9716f..83a977f 100644
--- a/chrome/browser/chromeos/status/status_area_button.h
+++ b/chrome/browser/chromeos/status/status_area_button.h
@@ -17,7 +17,7 @@ class StatusAreaButton : public views::MenuButton {
public:
explicit StatusAreaButton(views::ViewMenuDelegate* menu_delegate);
virtual ~StatusAreaButton() {}
- virtual void Paint(gfx::Canvas* canvas, bool for_drag);
+ virtual void OnPaint(gfx::Canvas* canvas, bool for_drag);
virtual gfx::Size GetPreferredSize();
virtual gfx::Insets GetInsets() const;
diff --git a/chrome/browser/chromeos/views/dropdown_button.cc b/chrome/browser/chromeos/views/dropdown_button.cc
index d6c7916..25193ec3 100644
--- a/chrome/browser/chromeos/views/dropdown_button.cc
+++ b/chrome/browser/chromeos/views/dropdown_button.cc
@@ -63,7 +63,7 @@ DropDownButton::DropDownButton(views::ButtonListener* listener,
DropDownButton::~DropDownButton() {
}
-void DropDownButton::PaintFocusBorder(gfx::Canvas* canvas) {
+void DropDownButton::OnPaintFocusBorder(gfx::Canvas* canvas) {
if (HasFocus() && (IsFocusable() || IsAccessibilityFocusableInRootView()))
canvas->DrawFocusRect(kFocusFrameLeftOffset, kFocusFrameTopOffset,
width() - kFocusFrameRightOffset,
diff --git a/chrome/browser/chromeos/views/dropdown_button.h b/chrome/browser/chromeos/views/dropdown_button.h
index 637b7fa..449ae43 100644
--- a/chrome/browser/chromeos/views/dropdown_button.h
+++ b/chrome/browser/chromeos/views/dropdown_button.h
@@ -22,7 +22,7 @@ class DropDownButton : public views::MenuButton {
bool show_menu_marker);
virtual ~DropDownButton();
- virtual void PaintFocusBorder(gfx::Canvas* canvas);
+ virtual void OnPaintFocusBorder(gfx::Canvas* canvas);
private:
DISALLOW_COPY_AND_ASSIGN(DropDownButton);
diff --git a/chrome/browser/ui/touch/tabs/touch_tab.cc b/chrome/browser/ui/touch/tabs/touch_tab.cc
index d9d8d95..69be10d 100644
--- a/chrome/browser/ui/touch/tabs/touch_tab.cc
+++ b/chrome/browser/ui/touch/tabs/touch_tab.cc
@@ -56,7 +56,7 @@ const gfx::Rect& TouchTab::GetIconBounds() const {
////////////////////////////////////////////////////////////////////////////////
// TouchTab, views::View overrides:
-void TouchTab::Paint(gfx::Canvas* canvas) {
+void TouchTab::OnPaint(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() && !data().mini)
diff --git a/chrome/browser/ui/touch/tabs/touch_tab.h b/chrome/browser/ui/touch/tabs/touch_tab.h
index aa252e47..614f18e 100644
--- a/chrome/browser/ui/touch/tabs/touch_tab.h
+++ b/chrome/browser/ui/touch/tabs/touch_tab.h
@@ -43,7 +43,7 @@ class TouchTab : public BaseTab {
private:
// Overridden from views::View:
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
virtual void Layout();
virtual bool HasHitTestMask() const;
virtual void GetHitTestMask(gfx::Path* path) const;
diff --git a/chrome/browser/ui/views/about_chrome_view.cc b/chrome/browser/ui/views/about_chrome_view.cc
index e68ce75..4b2cf5a 100644
--- a/chrome/browser/ui/views/about_chrome_view.cc
+++ b/chrome/browser/ui/views/about_chrome_view.cc
@@ -429,8 +429,8 @@ void AboutChromeView::Layout() {
}
-void AboutChromeView::Paint(gfx::Canvas* canvas) {
- views::View::Paint(canvas);
+void AboutChromeView::OnPaint(gfx::Canvas* canvas) {
+ views::View::OnPaint(canvas);
// Draw the background image color (and the separator) across the dialog.
// This will become the background for the logo image at the top of the
diff --git a/chrome/browser/ui/views/about_chrome_view.h b/chrome/browser/ui/views/about_chrome_view.h
index edbcb32..6393de0 100644
--- a/chrome/browser/ui/views/about_chrome_view.h
+++ b/chrome/browser/ui/views/about_chrome_view.h
@@ -51,7 +51,7 @@ class AboutChromeView : public views::View,
// Overridden from views::View:
virtual gfx::Size GetPreferredSize();
virtual void Layout();
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
virtual void ViewHierarchyChanged(bool is_add,
views::View* parent,
views::View* child);
diff --git a/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc b/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc
index e507df5..65e6c3b 100644
--- a/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc
+++ b/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc
@@ -233,7 +233,7 @@ class AutocompletePopupContentsView::InstantOptInView
// WARNING: we've been deleted.
}
- virtual void Paint(gfx::Canvas* canvas) {
+ virtual void OnPaint(gfx::Canvas* canvas) {
canvas->Save();
canvas->TranslateInt(kOptInBackgroundHInset, kOptInBackgroundVInset);
bg_painter_->Paint(width() - kOptInBackgroundHInset * 2,
@@ -281,7 +281,7 @@ class AutocompleteResultView : public views::View {
void set_match(const AutocompleteMatch& match) { match_ = match; }
// Overridden from views::View:
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
virtual void Layout();
virtual gfx::Size GetPreferredSize();
@@ -436,7 +436,7 @@ AutocompleteResultView::AutocompleteResultView(
AutocompleteResultView::~AutocompleteResultView() {
}
-void AutocompleteResultView::Paint(gfx::Canvas* canvas) {
+void AutocompleteResultView::OnPaint(gfx::Canvas* canvas) {
const ResultViewState state = GetState();
if (state != NORMAL)
canvas->AsCanvasSkia()->drawColor(GetColor(state, BACKGROUND));
@@ -945,7 +945,7 @@ void AutocompletePopupContentsView::AnimationProgressed(
////////////////////////////////////////////////////////////////////////////////
// AutocompletePopupContentsView, views::View overrides:
-void AutocompletePopupContentsView::Paint(gfx::Canvas* canvas) {
+void AutocompletePopupContentsView::OnPaint(gfx::Canvas* canvas) {
// We paint our children in an unconventional way.
//
// Because the border of this view creates an anti-aliased round-rect region
@@ -983,7 +983,7 @@ void AutocompletePopupContentsView::Paint(gfx::Canvas* canvas) {
// Now we paint the border, so it will be alpha-blended atop the contents.
// This looks slightly better in the corners than drawing the contents atop
// the border.
- PaintBorder(canvas);
+ OnPaintBorder(canvas);
}
void AutocompletePopupContentsView::Layout() {
diff --git a/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.h b/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.h
index b1af5e3..6440a1e 100644
--- a/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.h
+++ b/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.h
@@ -77,9 +77,9 @@ class AutocompletePopupContentsView : public views::View,
virtual void AnimationProgressed(const ui::Animation* animation);
// Overridden from views::View:
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
virtual void PaintChildren(gfx::Canvas* canvas) {
- // We paint our children inside Paint().
+ // We paint our children inside OnPaint().
}
virtual void Layout();
virtual void OnMouseEntered(const views::MouseEvent& event);
diff --git a/chrome/browser/ui/views/browser_actions_container.cc b/chrome/browser/ui/views/browser_actions_container.cc
index 9516d73..c405253 100644
--- a/chrome/browser/ui/views/browser_actions_container.cc
+++ b/chrome/browser/ui/views/browser_actions_container.cc
@@ -575,7 +575,7 @@ void BrowserActionsContainer::Layout() {
}
}
-void BrowserActionsContainer::Paint(gfx::Canvas* canvas) {
+void BrowserActionsContainer::OnPaint(gfx::Canvas* canvas) {
// TODO(sky/glen): Instead of using a drop indicator, animate the icons while
// dragging (like we do for tab dragging).
if (drop_indicator_position_ > -1) {
diff --git a/chrome/browser/ui/views/browser_actions_container.h b/chrome/browser/ui/views/browser_actions_container.h
index 4bce4b5..94c13139e 100644
--- a/chrome/browser/ui/views/browser_actions_container.h
+++ b/chrome/browser/ui/views/browser_actions_container.h
@@ -318,7 +318,7 @@ class BrowserActionsContainer
// Overridden from views::View:
virtual gfx::Size GetPreferredSize();
virtual void Layout();
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
virtual void ViewHierarchyChanged(bool is_add,
views::View* parent,
views::View* child);
diff --git a/chrome/browser/ui/views/constrained_window_win.cc b/chrome/browser/ui/views/constrained_window_win.cc
index 5827e52..01e2a58 100644
--- a/chrome/browser/ui/views/constrained_window_win.cc
+++ b/chrome/browser/ui/views/constrained_window_win.cc
@@ -158,7 +158,7 @@ class ConstrainedWindowFrameView
virtual void ResetWindowControls() { }
// Overridden from views::View:
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
virtual void Layout();
virtual void OnThemeChanged();
@@ -344,7 +344,7 @@ void ConstrainedWindowFrameView::EnableClose(bool enable) {
////////////////////////////////////////////////////////////////////////////////
// ConstrainedWindowFrameView, views::View implementation:
-void ConstrainedWindowFrameView::Paint(gfx::Canvas* canvas) {
+void ConstrainedWindowFrameView::OnPaint(gfx::Canvas* canvas) {
PaintFrameBorder(canvas);
PaintTitleBar(canvas);
PaintClientEdge(canvas);
diff --git a/chrome/browser/ui/views/create_application_shortcut_view.cc b/chrome/browser/ui/views/create_application_shortcut_view.cc
index cc12d2c..b4e59ca 100644
--- a/chrome/browser/ui/views/create_application_shortcut_view.cc
+++ b/chrome/browser/ui/views/create_application_shortcut_view.cc
@@ -50,7 +50,7 @@ class AppInfoView : public views::View {
void UpdateIcon(const SkBitmap& new_icon);
// Overridden from views::View:
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
private:
// Initializes the controls
@@ -155,7 +155,7 @@ void AppInfoView::UpdateIcon(const SkBitmap& new_icon) {
icon_->SetImage(new_icon);
}
-void AppInfoView::Paint(gfx::Canvas* canvas) {
+void AppInfoView::OnPaint(gfx::Canvas* canvas) {
gfx::Rect bounds = GetLocalBounds();
SkRect border_rect = {
diff --git a/chrome/browser/ui/views/default_search_view.cc b/chrome/browser/ui/views/default_search_view.cc
index 3dea858..2bc8967 100644
--- a/chrome/browser/ui/views/default_search_view.cc
+++ b/chrome/browser/ui/views/default_search_view.cc
@@ -124,7 +124,7 @@ void DefaultSearchView::Show(TabContents* tab_contents,
DefaultSearchView::~DefaultSearchView() {
}
-void DefaultSearchView::Paint(gfx::Canvas* canvas) {
+void DefaultSearchView::OnPaint(gfx::Canvas* canvas) {
// Fill in behind the background image with the standard gray toolbar color.
canvas->FillRectInt(SkColorSetRGB(237, 238, 237), 0, 0, width(),
background_image_->height());
diff --git a/chrome/browser/ui/views/default_search_view.h b/chrome/browser/ui/views/default_search_view.h
index a60263e..1b07bda 100644
--- a/chrome/browser/ui/views/default_search_view.h
+++ b/chrome/browser/ui/views/default_search_view.h
@@ -49,7 +49,7 @@ class DefaultSearchView
protected:
// Overridden from views::View:
// Draws the gray background at the top of the dialog.
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
// Overridden from views::ButtonListener:
virtual void ButtonPressed(views::Button* sender, const views::Event& event);
diff --git a/chrome/browser/ui/views/download_item_view.cc b/chrome/browser/ui/views/download_item_view.cc
index 92f5c341..8736136 100644
--- a/chrome/browser/ui/views/download_item_view.cc
+++ b/chrome/browser/ui/views/download_item_view.cc
@@ -452,7 +452,7 @@ void DownloadItemView::ButtonPressed(
// Load an icon for the file type we're downloading, and animate any in progress
// download state.
-void DownloadItemView::Paint(gfx::Canvas* canvas) {
+void DownloadItemView::OnPaint(gfx::Canvas* canvas) {
BodyImageSet* body_image_set = NULL;
switch (body_state_) {
case NORMAL:
diff --git a/chrome/browser/ui/views/download_item_view.h b/chrome/browser/ui/views/download_item_view.h
index 2bdfafd..168cc25 100644
--- a/chrome/browser/ui/views/download_item_view.h
+++ b/chrome/browser/ui/views/download_item_view.h
@@ -64,7 +64,7 @@ class DownloadItemView : public views::ButtonListener,
// View overrides
virtual void Layout();
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
virtual gfx::Size GetPreferredSize();
virtual void OnMouseExited(const views::MouseEvent& event);
virtual void OnMouseMoved(const views::MouseEvent& event);
diff --git a/chrome/browser/ui/views/download_shelf_view.cc b/chrome/browser/ui/views/download_shelf_view.cc
index 1db8bd2..cc6661b 100644
--- a/chrome/browser/ui/views/download_shelf_view.cc
+++ b/chrome/browser/ui/views/download_shelf_view.cc
@@ -183,9 +183,9 @@ views::View* DownloadShelfView::GetDefaultFocusableChild() {
return show_all_view_;
}
-void DownloadShelfView::Paint(gfx::Canvas* canvas) {
- PaintBackground(canvas);
- PaintBorder(canvas);
+void DownloadShelfView::OnPaint(gfx::Canvas* canvas) {
+ OnPaintBackground(canvas);
+ OnPaintBorder(canvas);
// Draw the focus rect here, since it's outside the bounds of the item.
for (size_t i = 0; i < download_views_.size(); ++i) {
@@ -197,7 +197,7 @@ void DownloadShelfView::Paint(gfx::Canvas* canvas) {
}
}
-void DownloadShelfView::PaintBorder(gfx::Canvas* canvas) {
+void DownloadShelfView::OnPaintBorder(gfx::Canvas* canvas) {
canvas->FillRectInt(kBorderColor, 0, 0, width(), 1);
}
diff --git a/chrome/browser/ui/views/download_shelf_view.h b/chrome/browser/ui/views/download_shelf_view.h
index 8d9c1f0..10f65fa 100644
--- a/chrome/browser/ui/views/download_shelf_view.h
+++ b/chrome/browser/ui/views/download_shelf_view.h
@@ -49,7 +49,7 @@ class DownloadShelfView : public AccessiblePaneView,
// Implementation of View.
virtual gfx::Size GetPreferredSize();
virtual void Layout();
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
// Implementation of ui::AnimationDelegate.
virtual void AnimationProgressed(const ui::Animation* animation);
@@ -96,7 +96,7 @@ class DownloadShelfView : public AccessiblePaneView,
void AddDownloadView(DownloadItemView* view);
// Paints the border.
- void PaintBorder(gfx::Canvas* canvas);
+ void OnPaintBorder(gfx::Canvas* canvas);
// Returns true if the shelf is wide enough to show the first download item.
bool CanFitFirstDownloadItem();
diff --git a/chrome/browser/ui/views/find_bar_view.cc b/chrome/browser/ui/views/find_bar_view.cc
index 87a7abd..52e7f53 100644
--- a/chrome/browser/ui/views/find_bar_view.cc
+++ b/chrome/browser/ui/views/find_bar_view.cc
@@ -268,7 +268,7 @@ void FindBarView::SetFocusAndSelection(bool select_all) {
///////////////////////////////////////////////////////////////////////////////
// FindBarView, views::View overrides:
-void FindBarView::Paint(gfx::Canvas* canvas) {
+void FindBarView::OnPaint(gfx::Canvas* canvas) {
SkPaint paint;
// Determine the find bar size as well as the offset from which to tile the
diff --git a/chrome/browser/ui/views/find_bar_view.h b/chrome/browser/ui/views/find_bar_view.h
index 80e7647..646f138 100644
--- a/chrome/browser/ui/views/find_bar_view.h
+++ b/chrome/browser/ui/views/find_bar_view.h
@@ -65,7 +65,7 @@ class FindBarView : public DropdownBarView,
virtual void SetFocusAndSelection(bool select_all);
// Overridden from views::View:
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
virtual void Layout();
virtual gfx::Size GetPreferredSize();
virtual void ViewHierarchyChanged(bool is_add,
diff --git a/chrome/browser/ui/views/first_run_search_engine_view.cc b/chrome/browser/ui/views/first_run_search_engine_view.cc
index 5cf2451..b1bcecf 100644
--- a/chrome/browser/ui/views/first_run_search_engine_view.cc
+++ b/chrome/browser/ui/views/first_run_search_engine_view.cc
@@ -155,7 +155,7 @@ void FirstRunSearchEngineView::ButtonPressed(views::Button* sender,
MessageLoop::current()->Quit();
}
-void FirstRunSearchEngineView::Paint(gfx::Canvas* canvas) {
+void FirstRunSearchEngineView::OnPaint(gfx::Canvas* canvas) {
// Fill in behind the background image with the standard gray toolbar color.
canvas->FillRectInt(SkColorSetRGB(237, 238, 237), 0, 0, width(),
background_image_->height());
diff --git a/chrome/browser/ui/views/first_run_search_engine_view.h b/chrome/browser/ui/views/first_run_search_engine_view.h
index 754111f..5db011b 100644
--- a/chrome/browser/ui/views/first_run_search_engine_view.h
+++ b/chrome/browser/ui/views/first_run_search_engine_view.h
@@ -105,7 +105,7 @@ class FirstRunSearchEngineView
virtual void ButtonPressed(views::Button* sender, const views::Event& event);
// Override from View so we can draw the gray background at dialog top.
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
// Overridden from TemplateURLModelObserver. When the search engines have
// loaded from the profile, we can populate the logos in the dialog box
diff --git a/chrome/browser/ui/views/frame/app_panel_browser_frame_view.cc b/chrome/browser/ui/views/frame/app_panel_browser_frame_view.cc
index bb75ed8..8ff262a 100644
--- a/chrome/browser/ui/views/frame/app_panel_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/app_panel_browser_frame_view.cc
@@ -213,7 +213,7 @@ void AppPanelBrowserFrameView::ResetWindowControls() {
///////////////////////////////////////////////////////////////////////////////
// AppPanelBrowserFrameView, views::View overrides:
-void AppPanelBrowserFrameView::Paint(gfx::Canvas* canvas) {
+void AppPanelBrowserFrameView::OnPaint(gfx::Canvas* canvas) {
views::Window* window = frame_->GetWindow();
if (window->IsMaximized())
PaintMaximizedFrameBorder(canvas);
diff --git a/chrome/browser/ui/views/frame/app_panel_browser_frame_view.h b/chrome/browser/ui/views/frame/app_panel_browser_frame_view.h
index 198284f..b1ba9a2 100644
--- a/chrome/browser/ui/views/frame/app_panel_browser_frame_view.h
+++ b/chrome/browser/ui/views/frame/app_panel_browser_frame_view.h
@@ -51,7 +51,7 @@ class AppPanelBrowserFrameView : public BrowserNonClientFrameView,
virtual void ResetWindowControls();
// Overridden from views::View:
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
virtual void Layout();
// Overridden from views::ButtonListener:
diff --git a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
index 1901ae7..c52ba7c 100644
--- a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
@@ -192,7 +192,7 @@ int GlassBrowserFrameView::NonClientHitTest(const gfx::Point& point) {
///////////////////////////////////////////////////////////////////////////////
// GlassBrowserFrameView, views::View overrides:
-void GlassBrowserFrameView::Paint(gfx::Canvas* canvas) {
+void GlassBrowserFrameView::OnPaint(gfx::Canvas* canvas) {
if (!browser_view_->IsTabStripVisible())
return; // Nothing is visible, so don't bother to paint.
diff --git a/chrome/browser/ui/views/frame/glass_browser_frame_view.h b/chrome/browser/ui/views/frame/glass_browser_frame_view.h
index 4086ea2..331071e 100644
--- a/chrome/browser/ui/views/frame/glass_browser_frame_view.h
+++ b/chrome/browser/ui/views/frame/glass_browser_frame_view.h
@@ -37,7 +37,7 @@ class GlassBrowserFrameView : public BrowserNonClientFrameView {
protected:
// Overridden from views::View:
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
virtual void Layout();
private:
diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
index c6e7f34..878c636 100644
--- a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
@@ -349,7 +349,7 @@ void OpaqueBrowserFrameView::ResetWindowControls() {
///////////////////////////////////////////////////////////////////////////////
// OpaqueBrowserFrameView, views::View overrides:
-void OpaqueBrowserFrameView::Paint(gfx::Canvas* canvas) {
+void OpaqueBrowserFrameView::OnPaint(gfx::Canvas* canvas) {
views::Window* window = frame_->GetWindow();
if (window->IsFullscreen())
return; // Nothing is visible, so don't bother to paint.
diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view.h b/chrome/browser/ui/views/frame/opaque_browser_frame_view.h
index baedea7..0303d3a 100644
--- a/chrome/browser/ui/views/frame/opaque_browser_frame_view.h
+++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view.h
@@ -56,7 +56,7 @@ class OpaqueBrowserFrameView : public BrowserNonClientFrameView,
virtual void ResetWindowControls();
// Overridden from views::View:
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
virtual void Layout();
virtual bool HitTest(const gfx::Point& l) const;
virtual AccessibilityTypes::Role GetAccessibleRole();
diff --git a/chrome/browser/ui/views/fullscreen_exit_bubble.cc b/chrome/browser/ui/views/fullscreen_exit_bubble.cc
index fc38f30..fa85636 100644
--- a/chrome/browser/ui/views/fullscreen_exit_bubble.cc
+++ b/chrome/browser/ui/views/fullscreen_exit_bubble.cc
@@ -39,7 +39,7 @@ class FullscreenExitBubble::FullscreenExitView : public views::View {
// views::View
virtual void Layout();
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
// Clickable hint text to show in the bubble.
views::Link link_;
@@ -83,7 +83,7 @@ void FullscreenExitBubble::FullscreenExitView::Layout() {
link_preferred_size.width(), link_preferred_size.height());
}
-void FullscreenExitBubble::FullscreenExitView::Paint(gfx::Canvas* canvas) {
+void FullscreenExitBubble::FullscreenExitView::OnPaint(gfx::Canvas* canvas) {
// Create a round-bottomed rect to fill the whole View.
SkRect rect;
SkScalar padding = SkIntToScalar(kPaddingPixels);
diff --git a/chrome/browser/ui/views/info_bubble.cc b/chrome/browser/ui/views/info_bubble.cc
index aad0b38..9440a9f 100644
--- a/chrome/browser/ui/views/info_bubble.cc
+++ b/chrome/browser/ui/views/info_bubble.cc
@@ -103,7 +103,7 @@ gfx::Rect BorderContents::GetMonitorBounds(const gfx::Rect& rect) {
return monitor_provider->GetMonitorWorkAreaMatching(rect);
}
-void BorderContents::Paint(gfx::Canvas* canvas) {
+void BorderContents::OnPaint(gfx::Canvas* canvas) {
// The border of this view creates an anti-aliased round-rect region for the
// contents, which we need to fill with the background color.
// NOTE: This doesn't handle an arrow location of "NONE", which has square top
@@ -124,7 +124,7 @@ void BorderContents::Paint(gfx::Canvas* canvas) {
// Now we paint the border, so it will be alpha-blended atop the contents.
// This looks slightly better in the corners than drawing the contents atop
// the border.
- PaintBorder(canvas);
+ OnPaintBorder(canvas);
}
void BorderContents::MirrorArrowIfOffScreen(
diff --git a/chrome/browser/ui/views/info_bubble.h b/chrome/browser/ui/views/info_bubble.h
index b329e80..e57ebc8 100644
--- a/chrome/browser/ui/views/info_bubble.h
+++ b/chrome/browser/ui/views/info_bubble.h
@@ -84,7 +84,7 @@ class BorderContents : public views::View {
private:
// Overridden from View:
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
// Changes |arrow_location| to its mirrored version, vertically if |vertical|
// is true, horizontally otherwise, if |window_bounds| don't fit in
diff --git a/chrome/browser/ui/views/infobars/translate_infobar_base.cc b/chrome/browser/ui/views/infobars/translate_infobar_base.cc
index 53c0734..83e0d81 100644
--- a/chrome/browser/ui/views/infobars/translate_infobar_base.cc
+++ b/chrome/browser/ui/views/infobars/translate_infobar_base.cc
@@ -137,7 +137,7 @@ TranslateInfoBarDelegate* TranslateInfoBarBase::GetDelegate() {
return delegate()->AsTranslateInfoBarDelegate();
}
-void TranslateInfoBarBase::PaintBackground(gfx::Canvas* canvas) {
+void TranslateInfoBarBase::OnPaintBackground(gfx::Canvas* canvas) {
// If we're not animating, simply paint the background for the current state.
if (!background_color_animation_->is_animating()) {
GetBackground().Paint(canvas, this);
diff --git a/chrome/browser/ui/views/infobars/translate_infobar_base.h b/chrome/browser/ui/views/infobars/translate_infobar_base.h
index 73494ef..35ed3aa 100644
--- a/chrome/browser/ui/views/infobars/translate_infobar_base.h
+++ b/chrome/browser/ui/views/infobars/translate_infobar_base.h
@@ -55,7 +55,7 @@ class TranslateInfoBarBase : public TranslateInfoBarView,
private:
// InfoBarView:
- virtual void PaintBackground(gfx::Canvas* canvas);
+ virtual void OnPaintBackground(gfx::Canvas* canvas);
virtual void AnimationProgressed(const ui::Animation* animation);
// Returns the background that should be displayed when not animating.
diff --git a/chrome/browser/ui/views/location_bar/content_setting_image_view.cc b/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
index c7ac5d1..66ddcda 100644
--- a/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
+++ b/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
@@ -157,7 +157,7 @@ void ContentSettingImageView::VisibilityChanged(View* starting_from,
info_bubble_->Close();
}
-void ContentSettingImageView::Paint(gfx::Canvas* canvas) {
+void ContentSettingImageView::OnPaint(gfx::Canvas* canvas) {
gfx::Insets current_insets;
if (border())
border()->GetInsets(&current_insets);
@@ -179,7 +179,7 @@ void ContentSettingImageView::Paint(gfx::Canvas* canvas) {
set_border(empty_border);
}
// Paint an icon with possibly non-empty left border.
- views::ImageView::Paint(canvas);
+ views::ImageView::OnPaint(canvas);
if (animation_in_progress_) {
// Paint text to the right of the icon.
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
@@ -191,9 +191,9 @@ void ContentSettingImageView::Paint(gfx::Canvas* canvas) {
}
}
-void ContentSettingImageView::PaintBackground(gfx::Canvas* canvas) {
+void ContentSettingImageView::OnPaintBackground(gfx::Canvas* canvas) {
if (!animation_in_progress_) {
- views::ImageView::PaintBackground(canvas);
+ views::ImageView::OnPaintBackground(canvas);
return;
}
// Paint yellow gradient background if in animation mode.
diff --git a/chrome/browser/ui/views/location_bar/content_setting_image_view.h b/chrome/browser/ui/views/location_bar/content_setting_image_view.h
index 0de0c8f..5e876fd 100644
--- a/chrome/browser/ui/views/location_bar/content_setting_image_view.h
+++ b/chrome/browser/ui/views/location_bar/content_setting_image_view.h
@@ -45,8 +45,8 @@ class ContentSettingImageView : public views::ImageView,
virtual bool OnMousePressed(const views::MouseEvent& event);
virtual void OnMouseReleased(const views::MouseEvent& event, bool canceled);
virtual void VisibilityChanged(View* starting_from, bool is_visible);
- virtual void Paint(gfx::Canvas* canvas);
- virtual void PaintBackground(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
+ virtual void OnPaintBackground(gfx::Canvas* canvas);
// InfoBubbleDelegate overrides:
virtual void InfoBubbleClosing(InfoBubble* info_bubble,
diff --git a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc
index c4a61ef..7640e96 100644
--- a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc
+++ b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc
@@ -46,7 +46,7 @@ void IconLabelBubbleView::SetImage(const SkBitmap& bitmap) {
image_->SetImage(bitmap);
}
-void IconLabelBubbleView::Paint(gfx::Canvas* canvas) {
+void IconLabelBubbleView::OnPaint(gfx::Canvas* canvas) {
background_painter_.Paint(width(), height(), canvas);
}
diff --git a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.h b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.h
index 97b4546..c60e872 100644
--- a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.h
+++ b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.h
@@ -38,7 +38,7 @@ class IconLabelBubbleView : public views::View {
void SetImage(const SkBitmap& bitmap);
void SetItemPadding(int padding) { item_padding_ = padding; }
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
virtual gfx::Size GetPreferredSize();
virtual void Layout();
diff --git a/chrome/browser/ui/views/location_bar/keyword_hint_view.cc b/chrome/browser/ui/views/location_bar/keyword_hint_view.cc
index c2f28d1..a9da4ac 100644
--- a/chrome/browser/ui/views/location_bar/keyword_hint_view.cc
+++ b/chrome/browser/ui/views/location_bar/keyword_hint_view.cc
@@ -79,7 +79,7 @@ void KeywordHintView::SetKeyword(const string16& keyword) {
}
}
-void KeywordHintView::Paint(gfx::Canvas* canvas) {
+void KeywordHintView::OnPaint(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/ui/views/location_bar/keyword_hint_view.h b/chrome/browser/ui/views/location_bar/keyword_hint_view.h
index 64e18a9..e0a3858 100644
--- a/chrome/browser/ui/views/location_bar/keyword_hint_view.h
+++ b/chrome/browser/ui/views/location_bar/keyword_hint_view.h
@@ -39,7 +39,7 @@ class KeywordHintView : public views::View {
void SetKeyword(const string16& keyword);
string16 keyword() const { return keyword_; }
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(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/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index 08d9f9c..c19a664 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -634,8 +634,8 @@ void LocationBarView::Layout() {
location_entry_view_->SetBoundsRect(location_bounds);
}
-void LocationBarView::Paint(gfx::Canvas* canvas) {
- View::Paint(canvas);
+void LocationBarView::OnPaint(gfx::Canvas* canvas) {
+ View::OnPaint(canvas);
if (painter_.get()) {
painter_->Paint(width(), height(), canvas);
@@ -652,7 +652,7 @@ void LocationBarView::Paint(gfx::Canvas* canvas) {
// TODO(pkasting): We need images that are transparent in the middle, so we
// can draw the border images over the background color instead of the
// reverse; this antialiases better (see comments in
- // AutocompletePopupContentsView::Paint()).
+ // AutocompletePopupContentsView::OnPaint()).
gfx::Rect bounds(GetContentsBounds());
bounds.Inset(0, kVerticalEdgeThickness);
SkColor color(GetColor(ToolbarModel::NONE, BACKGROUND));
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.h b/chrome/browser/ui/views/location_bar/location_bar_view.h
index 82445b6..424241c 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.h
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.h
@@ -159,10 +159,10 @@ class LocationBarView : public LocationBar,
// Layout and Painting functions
virtual void Layout();
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
// No focus border for the location bar, the caret is enough.
- virtual void PaintFocusBorder(gfx::Canvas* canvas) { }
+ virtual void OnPaintFocusBorder(gfx::Canvas* canvas) { }
// Called when any ancestor changes its size, asks the AutocompleteEditModel
// to close its popup.
diff --git a/chrome/browser/ui/views/location_bar/suggested_text_view.cc b/chrome/browser/ui/views/location_bar/suggested_text_view.cc
index fe7094d..d694182 100644
--- a/chrome/browser/ui/views/location_bar/suggested_text_view.cc
+++ b/chrome/browser/ui/views/location_bar/suggested_text_view.cc
@@ -37,7 +37,7 @@ void SuggestedTextView::StopAnimation() {
}
}
-void SuggestedTextView::PaintBackground(gfx::Canvas* canvas) {
+void SuggestedTextView::OnPaintBackground(gfx::Canvas* canvas) {
if (!animation_.get() || animation_->GetCurrentValue() == 0)
return;
diff --git a/chrome/browser/ui/views/location_bar/suggested_text_view.h b/chrome/browser/ui/views/location_bar/suggested_text_view.h
index 893901a..9f706b2 100644
--- a/chrome/browser/ui/views/location_bar/suggested_text_view.h
+++ b/chrome/browser/ui/views/location_bar/suggested_text_view.h
@@ -30,7 +30,7 @@ class SuggestedTextView : public views::Label,
void StopAnimation();
// View overrides:
- virtual void PaintBackground(gfx::Canvas* canvas);
+ virtual void OnPaintBackground(gfx::Canvas* canvas);
// AnimationDelegate overrides:
virtual void AnimationEnded(const ui::Animation* animation);
diff --git a/chrome/browser/ui/views/notifications/balloon_view.cc b/chrome/browser/ui/views/notifications/balloon_view.cc
index 69859cb..ccb4612 100644
--- a/chrome/browser/ui/views/notifications/balloon_view.cc
+++ b/chrome/browser/ui/views/notifications/balloon_view.cc
@@ -472,7 +472,7 @@ gfx::Rect BalloonViewImpl::GetContentsRectangle() const {
content_size.height());
}
-void BalloonViewImpl::Paint(gfx::Canvas* canvas) {
+void BalloonViewImpl::OnPaint(gfx::Canvas* canvas) {
DCHECK(canvas);
// Paint the menu bar area white, with proper rounded corners.
gfx::Path path;
@@ -490,8 +490,8 @@ void BalloonViewImpl::Paint(gfx::Canvas* canvas) {
canvas->FillRectInt(kControlBarSeparatorLineColor,
kLeftMargin, 1 + GetShelfHeight(), line_width, 1);
- View::Paint(canvas);
- PaintBorder(canvas);
+ View::OnPaint(canvas);
+ OnPaintBorder(canvas);
}
void BalloonViewImpl::Observe(NotificationType type,
diff --git a/chrome/browser/ui/views/notifications/balloon_view.h b/chrome/browser/ui/views/notifications/balloon_view.h
index 82bb309..804593a 100644
--- a/chrome/browser/ui/views/notifications/balloon_view.h
+++ b/chrome/browser/ui/views/notifications/balloon_view.h
@@ -66,7 +66,7 @@ class BalloonViewImpl : public BalloonView,
private:
// views::View interface.
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
virtual void OnBoundsChanged();
virtual gfx::Size GetPreferredSize();
diff --git a/chrome/browser/ui/views/options/advanced_contents_view.cc b/chrome/browser/ui/views/options/advanced_contents_view.cc
index 3711870..d192269 100644
--- a/chrome/browser/ui/views/options/advanced_contents_view.cc
+++ b/chrome/browser/ui/views/options/advanced_contents_view.cc
@@ -90,7 +90,7 @@ class FileDisplayArea : public views::View {
void SetFile(const FilePath& file_path);
// views::View overrides:
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
virtual void Layout();
virtual gfx::Size GetPreferredSize();
@@ -140,7 +140,7 @@ void FileDisplayArea::SetFile(const FilePath& file_path) {
}
}
-void FileDisplayArea::Paint(gfx::Canvas* canvas) {
+void FileDisplayArea::OnPaint(gfx::Canvas* canvas) {
HDC dc = canvas->BeginPlatformPaint();
RECT rect = { 0, 0, width(), height() };
gfx::NativeTheme::instance()->PaintTextField(
diff --git a/chrome/browser/ui/views/options/fonts_page_view.cc b/chrome/browser/ui/views/options/fonts_page_view.cc
index be6b4a7..44d6b5c 100644
--- a/chrome/browser/ui/views/options/fonts_page_view.cc
+++ b/chrome/browser/ui/views/options/fonts_page_view.cc
@@ -50,7 +50,7 @@ class FontDisplayView : public views::View {
int font_size() { return font_size_; }
// views::View overrides:
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
virtual void Layout();
virtual gfx::Size GetPreferredSize();
@@ -94,7 +94,7 @@ void FontDisplayView::SetFontType(const std::wstring& font_name,
font_text_label_->SetText(displayed_text);
}
-void FontDisplayView::Paint(gfx::Canvas* canvas) {
+void FontDisplayView::OnPaint(gfx::Canvas* canvas) {
HDC dc = canvas->BeginPlatformPaint();
RECT rect = { 0, 0, width(), height() };
gfx::NativeTheme::instance()->PaintTextField(
diff --git a/chrome/browser/ui/views/options/options_group_view.cc b/chrome/browser/ui/views/options/options_group_view.cc
index 0d4a64d..f4a9670 100644
--- a/chrome/browser/ui/views/options/options_group_view.cc
+++ b/chrome/browser/ui/views/options/options_group_view.cc
@@ -74,7 +74,7 @@ AccessibilityTypes::Role OptionsGroupView::GetAccessibleRole() {
return AccessibilityTypes::ROLE_GROUPING;
}
-void OptionsGroupView::Paint(gfx::Canvas* canvas) {
+void OptionsGroupView::OnPaint(gfx::Canvas* canvas) {
if (highlighted_) {
COLORREF infocolor = GetSysColor(COLOR_INFOBK);
SkColor background_color = SkColorSetRGB(GetRValue(infocolor),
diff --git a/chrome/browser/ui/views/options/options_group_view.h b/chrome/browser/ui/views/options/options_group_view.h
index 0d391b4..1d32c0a 100644
--- a/chrome/browser/ui/views/options/options_group_view.h
+++ b/chrome/browser/ui/views/options/options_group_view.h
@@ -36,7 +36,7 @@ class OptionsGroupView : public views::View {
protected:
// views::View overrides:
virtual AccessibilityTypes::Role GetAccessibleRole();
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
virtual void ViewHierarchyChanged(bool is_add,
views::View* parent,
views::View* child);
diff --git a/chrome/browser/ui/views/sad_tab_view.cc b/chrome/browser/ui/views/sad_tab_view.cc
index a5d2838..aae9163 100644
--- a/chrome/browser/ui/views/sad_tab_view.cc
+++ b/chrome/browser/ui/views/sad_tab_view.cc
@@ -70,7 +70,7 @@ SadTabView::SadTabView(TabContents* tab_contents, Kind kind)
}
}
-void SadTabView::Paint(gfx::Canvas* canvas) {
+void SadTabView::OnPaint(gfx::Canvas* canvas) {
SkPaint paint;
SkSafeUnref(paint.setShader(
gfx::CreateGradientShader(
diff --git a/chrome/browser/ui/views/sad_tab_view.h b/chrome/browser/ui/views/sad_tab_view.h
index 284fedf..8694aa4 100644
--- a/chrome/browser/ui/views/sad_tab_view.h
+++ b/chrome/browser/ui/views/sad_tab_view.h
@@ -34,7 +34,7 @@ class SadTabView : public views::View,
virtual ~SadTabView() {}
// Overridden from views::View:
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
virtual void Layout();
// Overridden from views::LinkController:
diff --git a/chrome/browser/ui/views/status_bubble_views.cc b/chrome/browser/ui/views/status_bubble_views.cc
index 022ea11..0aea46b 100644
--- a/chrome/browser/ui/views/status_bubble_views.cc
+++ b/chrome/browser/ui/views/status_bubble_views.cc
@@ -151,7 +151,7 @@ class StatusBubbleViews::StatusView : public views::Label,
void AnimateToState(double state);
void AnimationEnded(const Animation* animation);
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
BubbleStage stage_;
BubbleStyle style_;
@@ -335,7 +335,7 @@ void StatusBubbleViews::StatusView::SetStyle(BubbleStyle style) {
}
}
-void StatusBubbleViews::StatusView::Paint(gfx::Canvas* canvas) {
+void StatusBubbleViews::StatusView::OnPaint(gfx::Canvas* canvas) {
SkPaint paint;
paint.setStyle(SkPaint::kFill_Style);
paint.setFlags(SkPaint::kAntiAlias_Flag);
diff --git a/chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc b/chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc
index 345482b..a3249fd 100644
--- a/chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc
+++ b/chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc
@@ -230,7 +230,7 @@ void TabContentsViewViews::OnBoundsChanged() {
WasSized(size());
}
-void TabContentsViewViews::Paint(gfx::Canvas* canvas) {
+void TabContentsViewViews::OnPaint(gfx::Canvas* canvas) {
}
void TabContentsViewViews::UpdateDragCursor(WebDragOperation operation) {
diff --git a/chrome/browser/ui/views/tab_icon_view.cc b/chrome/browser/ui/views/tab_icon_view.cc
index 34f1270..6ec77da 100644
--- a/chrome/browser/ui/views/tab_icon_view.cc
+++ b/chrome/browser/ui/views/tab_icon_view.cc
@@ -132,7 +132,7 @@ void TabIconView::PaintIcon(gfx::Canvas* canvas,
dest_h, filter);
}
-void TabIconView::Paint(gfx::Canvas* canvas) {
+void TabIconView::OnPaint(gfx::Canvas* canvas) {
bool rendered = false;
if (throbber_running_) {
diff --git a/chrome/browser/ui/views/tab_icon_view.h b/chrome/browser/ui/views/tab_icon_view.h
index 2b83d29..90a5641 100644
--- a/chrome/browser/ui/views/tab_icon_view.h
+++ b/chrome/browser/ui/views/tab_icon_view.h
@@ -39,8 +39,8 @@ class TabIconView : public views::View {
// Set the throbber to the light style (for use on dark backgrounds).
void set_is_light(bool is_light) { is_light_ = is_light; }
- // Overriden from View
- virtual void Paint(gfx::Canvas* canvas);
+ // Overridden from View
+ virtual void OnPaint(gfx::Canvas* canvas);
virtual gfx::Size GetPreferredSize();
private:
diff --git a/chrome/browser/ui/views/tabs/dragged_tab_controller.cc b/chrome/browser/ui/views/tabs/dragged_tab_controller.cc
index 0ee3832..f1345ad 100644
--- a/chrome/browser/ui/views/tabs/dragged_tab_controller.cc
+++ b/chrome/browser/ui/views/tabs/dragged_tab_controller.cc
@@ -80,7 +80,7 @@ class DockView : public views::View {
return gfx::Size(DockInfo::popup_width(), DockInfo::popup_height());
}
- virtual void PaintBackground(gfx::Canvas* canvas) {
+ virtual void OnPaintBackground(gfx::Canvas* canvas) {
SkRect outer_rect = { SkIntToScalar(0), SkIntToScalar(0),
SkIntToScalar(width()),
SkIntToScalar(height()) };
diff --git a/chrome/browser/ui/views/tabs/dragged_tab_view.cc b/chrome/browser/ui/views/tabs/dragged_tab_view.cc
index 367019e..0a08049 100644
--- a/chrome/browser/ui/views/tabs/dragged_tab_view.cc
+++ b/chrome/browser/ui/views/tabs/dragged_tab_view.cc
@@ -121,7 +121,7 @@ void DraggedTabView::Update() {
///////////////////////////////////////////////////////////////////////////////
// DraggedTabView, views::View overrides:
-void DraggedTabView::Paint(gfx::Canvas* canvas) {
+void DraggedTabView::OnPaint(gfx::Canvas* canvas) {
if (show_contents_on_drag_)
PaintDetachedView(canvas);
else
diff --git a/chrome/browser/ui/views/tabs/dragged_tab_view.h b/chrome/browser/ui/views/tabs/dragged_tab_view.h
index d2dda61..d404a31 100644
--- a/chrome/browser/ui/views/tabs/dragged_tab_view.h
+++ b/chrome/browser/ui/views/tabs/dragged_tab_view.h
@@ -52,7 +52,7 @@ class DraggedTabView : public views::View {
private:
// Overridden from views::View:
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
virtual void Layout();
virtual gfx::Size GetPreferredSize();
diff --git a/chrome/browser/ui/views/tabs/side_tab.cc b/chrome/browser/ui/views/tabs/side_tab.cc
index e29eeeb..89b0977 100644
--- a/chrome/browser/ui/views/tabs/side_tab.cc
+++ b/chrome/browser/ui/views/tabs/side_tab.cc
@@ -75,7 +75,7 @@ void SideTab::Layout() {
font_height());
}
-void SideTab::Paint(gfx::Canvas* canvas) {
+void SideTab::OnPaint(gfx::Canvas* canvas) {
if (ShouldPaintHighlight()) {
SkPaint paint;
paint.setColor(kTabBackgroundColor);
diff --git a/chrome/browser/ui/views/tabs/side_tab.h b/chrome/browser/ui/views/tabs/side_tab.h
index dde816b..540c45e 100644
--- a/chrome/browser/ui/views/tabs/side_tab.h
+++ b/chrome/browser/ui/views/tabs/side_tab.h
@@ -22,7 +22,7 @@ class SideTab : public BaseTab {
// views::View Overrides:
virtual void Layout();
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
virtual gfx::Size GetPreferredSize();
protected:
diff --git a/chrome/browser/ui/views/tabs/tab.cc b/chrome/browser/ui/views/tabs/tab.cc
index 9cb04d9..56c268a 100644
--- a/chrome/browser/ui/views/tabs/tab.cc
+++ b/chrome/browser/ui/views/tabs/tab.cc
@@ -184,7 +184,7 @@ void Tab::DataChanged(const TabRendererData& old) {
////////////////////////////////////////////////////////////////////////////////
// Tab, views::View overrides:
-void Tab::Paint(gfx::Canvas* canvas) {
+void Tab::OnPaint(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() && !data().mini)
@@ -298,8 +298,8 @@ void Tab::Layout() {
// Certain UI elements within the Tab (the favicon, etc.) are not represented
// as child Views (which is the preferred method). Instead, these UI elements
- // are drawn directly on the canvas from within Tab::Paint(). The Tab's child
- // Views (for example, the Tab's close button which is a views::Button
+ // are drawn directly on the canvas from within Tab::OnPaint(). The Tab's
+ // child Views (for example, the Tab's close button which is a views::Button
// instance) are automatically mirrored by the mirroring infrastructure in
// views. The elements Tab draws directly on the canvas need to be manually
// mirrored if the View's layout is right-to-left.
diff --git a/chrome/browser/ui/views/tabs/tab.h b/chrome/browser/ui/views/tabs/tab.h
index a5b6c98..debd280 100644
--- a/chrome/browser/ui/views/tabs/tab.h
+++ b/chrome/browser/ui/views/tabs/tab.h
@@ -63,7 +63,7 @@ class Tab : public BaseTab {
private:
// Overridden from views::View:
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
virtual void Layout();
virtual void OnThemeChanged();
virtual std::string GetClassName() const { return kViewClassName; }
diff --git a/chrome/browser/ui/views/theme_install_bubble_view.cc b/chrome/browser/ui/views/theme_install_bubble_view.cc
index f28e848..067952f 100644
--- a/chrome/browser/ui/views/theme_install_bubble_view.cc
+++ b/chrome/browser/ui/views/theme_install_bubble_view.cc
@@ -112,7 +112,7 @@ void ThemeInstallBubbleView::Reposition() {
popup_->SetBounds(gfx::Rect(x, y, size.width(), size.height()));
}
-void ThemeInstallBubbleView::Paint(gfx::Canvas* canvas) {
+void ThemeInstallBubbleView::OnPaint(gfx::Canvas* canvas) {
SkScalar rad[8];
for (int i = 0; i < 8; ++i)
rad[i] = SkIntToScalar(kBubbleCornerRadius);
diff --git a/chrome/browser/ui/views/theme_install_bubble_view.h b/chrome/browser/ui/views/theme_install_bubble_view.h
index dc81616..450d4cf 100644
--- a/chrome/browser/ui/views/theme_install_bubble_view.h
+++ b/chrome/browser/ui/views/theme_install_bubble_view.h
@@ -56,7 +56,7 @@ class ThemeInstallBubbleView : public NotificationObserver,
// Shut down the popup and remove our notifications.
void Close();
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
// The content area at the start of the animation.
gfx::Rect tab_contents_bounds_;
diff --git a/chrome/browser/ui/views/toolbar_view.cc b/chrome/browser/ui/views/toolbar_view.cc
index ee2813d..6e26bf2 100644
--- a/chrome/browser/ui/views/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar_view.cc
@@ -509,7 +509,7 @@ void ToolbarView::Layout() {
bool maximized = browser_->window() && browser_->window()->IsMaximized();
if (!IsDisplayModeNormal()) {
int edge_width = maximized ?
- 0 : kPopupBackgroundEdge->width(); // See Paint().
+ 0 : kPopupBackgroundEdge->width(); // See OnPaint().
location_bar_->SetBounds(edge_width, PopupTopSpacing(),
width() - (edge_width * 2), location_bar_->GetPreferredSize().height());
return;
@@ -590,8 +590,8 @@ void ToolbarView::Layout() {
#endif
}
-void ToolbarView::Paint(gfx::Canvas* canvas) {
- View::Paint(canvas);
+void ToolbarView::OnPaint(gfx::Canvas* canvas) {
+ View::OnPaint(canvas);
if (IsDisplayModeNormal())
return;
diff --git a/chrome/browser/ui/views/toolbar_view.h b/chrome/browser/ui/views/toolbar_view.h
index f08e35f..37176e6 100644
--- a/chrome/browser/ui/views/toolbar_view.h
+++ b/chrome/browser/ui/views/toolbar_view.h
@@ -118,7 +118,7 @@ class ToolbarView : public AccessiblePaneView,
// Overridden from views::View:
virtual gfx::Size GetPreferredSize();
virtual void Layout();
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
virtual void OnThemeChanged();
// The apparent horizontal space between most items, and the vertical padding
diff --git a/views/background.h b/views/background.h
index c4848db..56bb7f8 100644
--- a/views/background.h
+++ b/views/background.h
@@ -33,7 +33,7 @@ class View;
// Background can be subclassed to implement various effects.
//
// Any View can have a background. See View::SetBackground() and
-// View::PaintBackground()
+// View::OnPaintBackground()
//
/////////////////////////////////////////////////////////////////////////////
class Background {
diff --git a/views/controls/button/checkbox.cc b/views/controls/button/checkbox.cc
index b89058f..8d554909 100644
--- a/views/controls/button/checkbox.cc
+++ b/views/controls/button/checkbox.cc
@@ -117,7 +117,7 @@ void Checkbox::SetEnabled(bool enabled) {
label_->SetEnabled(enabled);
}
-void Checkbox::PaintFocusBorder(gfx::Canvas* canvas) {
+void Checkbox::OnPaintFocusBorder(gfx::Canvas* canvas) {
// Our focus border is rendered by the label, so we don't do anything here.
}
diff --git a/views/controls/button/checkbox.h b/views/controls/button/checkbox.h
index 7e01afa..c6ec53d 100644
--- a/views/controls/button/checkbox.h
+++ b/views/controls/button/checkbox.h
@@ -46,7 +46,7 @@ class Checkbox : public NativeButton {
virtual int GetHeightForWidth(int w);
virtual void Layout();
virtual void SetEnabled(bool enabled);
- virtual void PaintFocusBorder(gfx::Canvas* canvas);
+ virtual void OnPaintFocusBorder(gfx::Canvas* canvas);
virtual View* GetViewForPoint(const gfx::Point& point);
virtual View* GetViewForPoint(const gfx::Point& point,
bool can_create_floating);
diff --git a/views/controls/button/image_button.cc b/views/controls/button/image_button.cc
index 0e18377..612ce88 100644
--- a/views/controls/button/image_button.cc
+++ b/views/controls/button/image_button.cc
@@ -22,7 +22,7 @@ ImageButton::ImageButton(ButtonListener* listener)
h_alignment_(ALIGN_LEFT),
v_alignment_(ALIGN_TOP),
preferred_size_(kDefaultWidth, kDefaultHeight) {
- // By default, we request that the gfx::Canvas passed to our View::Paint()
+ // By default, we request that the gfx::Canvas passed to our View::OnPaint()
// implementation is flipped horizontally so that the button's bitmaps are
// mirrored when the UI directionality is right-to-left.
EnableCanvasFlippingForRTLUI(true);
@@ -64,9 +64,9 @@ gfx::Size ImageButton::GetPreferredSize() {
return preferred_size_;
}
-void ImageButton::Paint(gfx::Canvas* canvas) {
+void ImageButton::OnPaint(gfx::Canvas* canvas) {
// Call the base class first to paint any background/borders.
- View::Paint(canvas);
+ View::OnPaint(canvas);
SkBitmap img = GetImageToPaint();
@@ -87,7 +87,7 @@ void ImageButton::Paint(gfx::Canvas* canvas) {
canvas->DrawBitmapInt(background_image_, x, y);
canvas->DrawBitmapInt(img, x, y);
}
- PaintFocusBorder(canvas);
+ OnPaintFocusBorder(canvas);
}
////////////////////////////////////////////////////////////////////////////////
diff --git a/views/controls/button/image_button.h b/views/controls/button/image_button.h
index 7d214c0..7ac6a29 100644
--- a/views/controls/button/image_button.h
+++ b/views/controls/button/image_button.h
@@ -44,7 +44,7 @@ class ImageButton : public CustomButton {
// Overridden from View:
virtual gfx::Size GetPreferredSize();
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
// Sets preferred size, so it could be correctly positioned in layout even if
// it is NULL.
diff --git a/views/controls/button/menu_button.cc b/views/controls/button/menu_button.cc
index 766b3dc..f88b106 100644
--- a/views/controls/button/menu_button.cc
+++ b/views/controls/button/menu_button.cc
@@ -88,7 +88,7 @@ void MenuButton::Paint(gfx::Canvas* canvas, bool for_drag) {
gfx::Insets insets = GetInsets();
// We can not use the views' mirroring infrastructure for mirroring a
- // MenuButton control (see TextButton::Paint() for a detailed explanation
+ // MenuButton control (see TextButton::OnPaint() for a detailed explanation
// regarding why we can not flip the canvas). Therefore, we need to
// manually mirror the position of the down arrow.
gfx::Rect arrow_bounds(width() - insets.right() -
diff --git a/views/controls/button/native_button.cc b/views/controls/button/native_button.cc
index b822f51..5cf1511 100644
--- a/views/controls/button/native_button.cc
+++ b/views/controls/button/native_button.cc
@@ -210,9 +210,9 @@ void NativeButton::Focus() {
// keyboard messages).
}
-void NativeButton::PaintFocusBorder(gfx::Canvas* canvas) {
+void NativeButton::OnPaintFocusBorder(gfx::Canvas* canvas) {
if (NativeViewHost::kRenderNativeControlFocus)
- View::PaintFocusBorder(canvas);
+ View::OnPaintFocusBorder(canvas);
}
////////////////////////////////////////////////////////////////////////////////
diff --git a/views/controls/button/native_button.h b/views/controls/button/native_button.h
index b20b2f2..f4d21d4 100644
--- a/views/controls/button/native_button.h
+++ b/views/controls/button/native_button.h
@@ -56,7 +56,7 @@ class NativeButton : public Button {
virtual void Layout();
virtual void SetEnabled(bool flag);
virtual void Focus();
- virtual void PaintFocusBorder(gfx::Canvas* canvas);
+ virtual void OnPaintFocusBorder(gfx::Canvas* canvas);
protected:
virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child);
diff --git a/views/controls/button/text_button.cc b/views/controls/button/text_button.cc
index 14bbad0..812377d 100644
--- a/views/controls/button/text_button.cc
+++ b/views/controls/button/text_button.cc
@@ -271,7 +271,7 @@ void TextButton::SetShowMultipleIconStates(bool show_multiple_icon_states) {
void TextButton::Paint(gfx::Canvas* canvas, bool for_drag) {
if (!for_drag) {
- PaintBackground(canvas);
+ OnPaintBackground(canvas);
if (show_multiple_icon_states_ && hover_animation_->is_animating()) {
// Draw the hover bitmap into an offscreen buffer, then blend it
@@ -280,15 +280,15 @@ void TextButton::Paint(gfx::Canvas* canvas, bool for_drag) {
static_cast<int>(hover_animation_->GetCurrentValue() * 255));
canvas->AsCanvasSkia()->drawARGB(0, 255, 255, 255,
SkXfermode::kClear_Mode);
- PaintBorder(canvas);
+ OnPaintBorder(canvas);
canvas->Restore();
} else if ((show_multiple_icon_states_ &&
(state_ == BS_HOT || state_ == BS_PUSHED)) ||
(state_ == BS_NORMAL && normal_has_border_)) {
- PaintBorder(canvas);
+ OnPaintBorder(canvas);
}
- PaintFocusBorder(canvas);
+ OnPaintFocusBorder(canvas);
}
SkBitmap icon = icon_;
@@ -457,7 +457,7 @@ std::string TextButton::GetClassName() const {
return kViewClassName;
}
-void TextButton::Paint(gfx::Canvas* canvas) {
+void TextButton::OnPaint(gfx::Canvas* canvas) {
Paint(canvas, false);
}
diff --git a/views/controls/button/text_button.h b/views/controls/button/text_button.h
index 5206c22..badf0b4 100644
--- a/views/controls/button/text_button.h
+++ b/views/controls/button/text_button.h
@@ -174,7 +174,7 @@ class TextButton : public CustomButton {
protected:
SkBitmap icon() const { return icon_; }
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
// Called when enabled or disabled state changes, or the colors for those
// states change.
diff --git a/views/controls/combobox/combobox.cc b/views/controls/combobox/combobox.cc
index 2349bbb..5f9af57 100644
--- a/views/controls/combobox/combobox.cc
+++ b/views/controls/combobox/combobox.cc
@@ -84,9 +84,9 @@ bool Combobox::SkipDefaultKeyEventProcessing(const KeyEvent& e) {
return native_wrapper_ && native_wrapper_->IsDropdownOpen();
}
-void Combobox::PaintFocusBorder(gfx::Canvas* canvas) {
+void Combobox::OnPaintFocusBorder(gfx::Canvas* canvas) {
if (NativeViewHost::kRenderNativeControlFocus)
- View::PaintFocusBorder(canvas);
+ View::OnPaintFocusBorder(canvas);
}
AccessibilityTypes::Role Combobox::GetAccessibleRole() {
diff --git a/views/controls/combobox/combobox.h b/views/controls/combobox/combobox.h
index 4d48ec1..cb25968 100644
--- a/views/controls/combobox/combobox.h
+++ b/views/controls/combobox/combobox.h
@@ -63,7 +63,7 @@ class Combobox : public View {
virtual void Layout();
virtual void SetEnabled(bool enabled);
virtual bool SkipDefaultKeyEventProcessing(const KeyEvent& e);
- virtual void PaintFocusBorder(gfx::Canvas* canvas);
+ virtual void OnPaintFocusBorder(gfx::Canvas* canvas);
virtual AccessibilityTypes::Role GetAccessibleRole() OVERRIDE;
virtual string16 GetAccessibleValue() OVERRIDE;
diff --git a/views/controls/image_view.cc b/views/controls/image_view.cc
index c9506b1..7f05e97 100644
--- a/views/controls/image_view.cc
+++ b/views/controls/image_view.cc
@@ -103,8 +103,8 @@ gfx::Point ImageView::ComputeImageOrigin(const gfx::Size& image_size) const {
return gfx::Point(x, y);
}
-void ImageView::Paint(gfx::Canvas* canvas) {
- View::Paint(canvas);
+void ImageView::OnPaint(gfx::Canvas* canvas) {
+ View::OnPaint(canvas);
if (image_.empty())
return;
diff --git a/views/controls/image_view.h b/views/controls/image_view.h
index f119dc1..b1791ac 100644
--- a/views/controls/image_view.h
+++ b/views/controls/image_view.h
@@ -76,7 +76,7 @@ class ImageView : public View {
// Overriden from View
virtual gfx::Size GetPreferredSize();
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
virtual AccessibilityTypes::Role GetAccessibleRole();
virtual bool GetTooltipText(const gfx::Point& p, std::wstring* tooltip);
diff --git a/views/controls/label.cc b/views/controls/label.cc
index 427d7ad..1b105f0 100644
--- a/views/controls/label.cc
+++ b/views/controls/label.cc
@@ -77,8 +77,8 @@ void Label::OnBoundsChanged() {
text_size_valid_ &= !is_multi_line_;
}
-void Label::Paint(gfx::Canvas* canvas) {
- PaintBackground(canvas);
+void Label::OnPaint(gfx::Canvas* canvas) {
+ OnPaintBackground(canvas);
std::wstring paint_text;
gfx::Rect text_bounds;
@@ -87,7 +87,7 @@ void Label::Paint(gfx::Canvas* canvas) {
PaintText(canvas, paint_text, text_bounds, flags);
}
-void Label::PaintBackground(gfx::Canvas* canvas) {
+void Label::OnPaintBackground(gfx::Canvas* canvas) {
const Background* bg = contains_mouse_ ? GetMouseOverBackground() : NULL;
if (!bg)
bg = background();
diff --git a/views/controls/label.h b/views/controls/label.h
index 8ff6e51..d916659 100644
--- a/views/controls/label.h
+++ b/views/controls/label.h
@@ -72,11 +72,11 @@ class Label : public View {
virtual std::string GetClassName() const { return kViewClassName; }
// Overridden to paint
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
// If the mouse is over the label, and a mouse over background has been
// specified, its used. Otherwise super's implementation is invoked.
- virtual void PaintBackground(gfx::Canvas* canvas);
+ virtual void OnPaintBackground(gfx::Canvas* canvas);
// Set the font.
void SetFont(const gfx::Font& font);
diff --git a/views/controls/menu/menu_item_view.cc b/views/controls/menu/menu_item_view.cc
index f35d0db..ed44c3a 100644
--- a/views/controls/menu/menu_item_view.cc
+++ b/views/controls/menu/menu_item_view.cc
@@ -346,7 +346,7 @@ void MenuItemView::SetIcon(const SkBitmap& icon) {
SchedulePaint();
}
-void MenuItemView::Paint(gfx::Canvas* canvas) {
+void MenuItemView::OnPaint(gfx::Canvas* canvas) {
Paint(canvas, false);
}
diff --git a/views/controls/menu/menu_item_view.h b/views/controls/menu/menu_item_view.h
index e85d8a0..5b5e09c 100644
--- a/views/controls/menu/menu_item_view.h
+++ b/views/controls/menu/menu_item_view.h
@@ -243,7 +243,7 @@ class MenuItemView : public View {
int GetCommand() const { return command_; }
// Paints the menu item.
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
// Returns the preferred size of this item.
virtual gfx::Size GetPreferredSize();
diff --git a/views/controls/menu/menu_scroll_view_container.cc b/views/controls/menu/menu_scroll_view_container.cc
index 3ecc3ba..f955b01 100644
--- a/views/controls/menu/menu_scroll_view_container.cc
+++ b/views/controls/menu/menu_scroll_view_container.cc
@@ -178,9 +178,9 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view) {
SubmenuView::kSubmenuBorderSize));
}
-void MenuScrollViewContainer::PaintBackground(gfx::Canvas* canvas) {
+void MenuScrollViewContainer::OnPaintBackground(gfx::Canvas* canvas) {
if (background()) {
- View::PaintBackground(canvas);
+ View::OnPaintBackground(canvas);
return;
}
diff --git a/views/controls/menu/menu_scroll_view_container.h b/views/controls/menu/menu_scroll_view_container.h
index d8dbe0c..5472091 100644
--- a/views/controls/menu/menu_scroll_view_container.h
+++ b/views/controls/menu/menu_scroll_view_container.h
@@ -24,7 +24,7 @@ class MenuScrollViewContainer : public View {
View* scroll_up_button() const { return scroll_up_button_; }
// View overrides.
- virtual void PaintBackground(gfx::Canvas* canvas);
+ virtual void OnPaintBackground(gfx::Canvas* canvas);
virtual void Layout();
virtual void OnBoundsChanged();
virtual gfx::Size GetPreferredSize();
diff --git a/views/controls/menu/menu_separator.h b/views/controls/menu/menu_separator.h
index 7a22b58..393b3b2 100644
--- a/views/controls/menu/menu_separator.h
+++ b/views/controls/menu/menu_separator.h
@@ -16,7 +16,7 @@ class MenuSeparator : public View {
MenuSeparator() {}
// View overrides.
- void Paint(gfx::Canvas* canvas);
+ void OnPaint(gfx::Canvas* canvas);
gfx::Size GetPreferredSize();
private:
diff --git a/views/controls/menu/menu_separator_gtk.cc b/views/controls/menu/menu_separator_gtk.cc
index dd11884..5283109 100644
--- a/views/controls/menu/menu_separator_gtk.cc
+++ b/views/controls/menu/menu_separator_gtk.cc
@@ -12,7 +12,7 @@ namespace views {
static const SkColor kSeparatorColor = SkColorSetARGB(50, 00, 00, 00);
-void MenuSeparator::Paint(gfx::Canvas* canvas) {
+void MenuSeparator::OnPaint(gfx::Canvas* canvas) {
canvas->DrawLineInt(kSeparatorColor, 0, height() / 2, width(), height() / 2);
}
diff --git a/views/controls/menu/menu_separator_win.cc b/views/controls/menu/menu_separator_win.cc
index a34d1d2..b2f8a3e 100644
--- a/views/controls/menu/menu_separator_win.cc
+++ b/views/controls/menu/menu_separator_win.cc
@@ -15,7 +15,7 @@
namespace views {
-void MenuSeparator::Paint(gfx::Canvas* canvas) {
+void MenuSeparator::OnPaint(gfx::Canvas* canvas) {
const MenuConfig& config = MenuConfig::instance();
// The gutter is rendered before the background.
int start_x = 0;
diff --git a/views/controls/native/native_view_host.cc b/views/controls/native/native_view_host.cc
index b443ac9..81f1f2f 100644
--- a/views/controls/native/native_view_host.cc
+++ b/views/controls/native/native_view_host.cc
@@ -130,7 +130,7 @@ void NativeViewHost::Layout() {
}
}
-void NativeViewHost::Paint(gfx::Canvas* canvas) {
+void NativeViewHost::OnPaint(gfx::Canvas* canvas) {
// Paint background if there is one. NativeViewHost needs to paint
// a background when it is hosted in a TabbedPane. For Gtk implementation,
// NativeTabbedPaneGtk uses a WidgetGtk as page container and because
@@ -139,7 +139,7 @@ void NativeViewHost::Paint(gfx::Canvas* canvas) {
// cleared. For Windows case, it appears okay to not paint background because
// we don't have a container window in-between. However if you want to use
// customized background, then this becomes necessary.
- PaintBackground(canvas);
+ OnPaintBackground(canvas);
// The area behind our window is black, so during a fast resize (where our
// content doesn't draw over the full size of our native view, and the native
diff --git a/views/controls/native/native_view_host.h b/views/controls/native/native_view_host.h
index 11aa9fa..da8e540 100644
--- a/views/controls/native/native_view_host.h
+++ b/views/controls/native/native_view_host.h
@@ -78,7 +78,7 @@ class NativeViewHost : public View {
// Overridden from View:
virtual gfx::Size GetPreferredSize();
virtual void Layout();
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
virtual void VisibilityChanged(View* starting_from, bool is_visible);
virtual void Focus();
virtual bool ContainsNativeView(gfx::NativeView native_view) const;
diff --git a/views/controls/native_control.cc b/views/controls/native_control.cc
index f00ab84..4e6e2f3 100644
--- a/views/controls/native_control.cc
+++ b/views/controls/native_control.cc
@@ -318,7 +318,7 @@ void NativeControl::SetEnabled(bool enabled) {
}
}
-void NativeControl::Paint(gfx::Canvas* canvas) {
+void NativeControl::OnPaint(gfx::Canvas* canvas) {
}
void NativeControl::VisibilityChanged(View* starting_from, bool is_visible) {
diff --git a/views/controls/native_control.h b/views/controls/native_control.h
index 60f447c..b08ff53 100644
--- a/views/controls/native_control.h
+++ b/views/controls/native_control.h
@@ -41,7 +41,7 @@ class NativeControl : public View {
virtual void SetEnabled(bool enabled);
// Overridden to do nothing.
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
protected:
friend class NativeControlContainer;
diff --git a/views/controls/progress_bar.cc b/views/controls/progress_bar.cc
index f4c11ce..a6aabb1 100644
--- a/views/controls/progress_bar.cc
+++ b/views/controls/progress_bar.cc
@@ -142,7 +142,7 @@ gfx::Size ProgressBar::GetPreferredSize() {
return gfx::Size(100, 16);
}
-void ProgressBar::Paint(gfx::Canvas* canvas) {
+void ProgressBar::OnPaint(gfx::Canvas* canvas) {
#if defined(OS_CHROMEOS)
const SkColor background_colors[] = {
SkColorSetRGB(0xBB, 0xBB, 0xBB),
diff --git a/views/controls/progress_bar.h b/views/controls/progress_bar.h
index 8eaadf54..b2f1202 100644
--- a/views/controls/progress_bar.h
+++ b/views/controls/progress_bar.h
@@ -38,7 +38,7 @@ class ProgressBar : public View {
virtual std::string GetClassName() const;
// Overridden to paint
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
// Set and get the progress bar progress in range [0, kMaxProgress].
virtual void SetProgress(int progress);
diff --git a/views/controls/scrollbar/bitmap_scroll_bar.cc b/views/controls/scrollbar/bitmap_scroll_bar.cc
index 262545e..6ba05a6 100644
--- a/views/controls/scrollbar/bitmap_scroll_bar.cc
+++ b/views/controls/scrollbar/bitmap_scroll_bar.cc
@@ -409,7 +409,7 @@ gfx::Size BitmapScrollBar::GetPreferredSize() {
return gfx::Size(button_prefsize.width(), button_prefsize.height() * 2);
}
-void BitmapScrollBar::Paint(gfx::Canvas* canvas) {
+void BitmapScrollBar::OnPaint(gfx::Canvas* canvas) {
// Paint the track.
gfx::Rect track_bounds = GetTrackBounds();
canvas->TileImageInt(*images_[THUMB_TRACK][thumb_track_state_],
diff --git a/views/controls/scrollbar/bitmap_scroll_bar.h b/views/controls/scrollbar/bitmap_scroll_bar.h
index 67e1fba..07667d1 100644
--- a/views/controls/scrollbar/bitmap_scroll_bar.h
+++ b/views/controls/scrollbar/bitmap_scroll_bar.h
@@ -96,7 +96,7 @@ class BitmapScrollBar : public ScrollBar,
// View overrides:
virtual gfx::Size GetPreferredSize();
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
virtual void Layout();
virtual bool OnMousePressed(const MouseEvent& event);
virtual void OnMouseReleased(const MouseEvent& event, bool canceled);
diff --git a/views/controls/slider/slider.cc b/views/controls/slider/slider.cc
index e4a3a76..993e524 100644
--- a/views/controls/slider/slider.cc
+++ b/views/controls/slider/slider.cc
@@ -85,9 +85,9 @@ void Slider::Focus() {
}
}
-void Slider::PaintFocusBorder(gfx::Canvas* canvas) {
+void Slider::OnPaintFocusBorder(gfx::Canvas* canvas) {
if (NativeViewHost::kRenderNativeControlFocus)
- View::PaintFocusBorder(canvas);
+ View::OnPaintFocusBorder(canvas);
}
void Slider::ViewHierarchyChanged(bool is_add, View* parent, View* child) {
diff --git a/views/controls/slider/slider.h b/views/controls/slider/slider.h
index c0ab251..c61da1e 100644
--- a/views/controls/slider/slider.h
+++ b/views/controls/slider/slider.h
@@ -71,7 +71,7 @@ class Slider : public View {
virtual void Layout();
virtual gfx::Size GetPreferredSize();
virtual void SetEnabled(bool enabled);
- virtual void PaintFocusBorder(gfx::Canvas* canvas);
+ virtual void OnPaintFocusBorder(gfx::Canvas* canvas);
protected:
virtual void Focus();
diff --git a/views/controls/tabbed_pane/tabbed_pane.cc b/views/controls/tabbed_pane/tabbed_pane.cc
index 07a2d8d..41f4432 100644
--- a/views/controls/tabbed_pane/tabbed_pane.cc
+++ b/views/controls/tabbed_pane/tabbed_pane.cc
@@ -126,9 +126,9 @@ void TabbedPane::Focus() {
// messages).
}
-void TabbedPane::PaintFocusBorder(gfx::Canvas* canvas) {
+void TabbedPane::OnPaintFocusBorder(gfx::Canvas* canvas) {
if (NativeViewHost::kRenderNativeControlFocus)
- View::PaintFocusBorder(canvas);
+ View::OnPaintFocusBorder(canvas);
}
AccessibilityTypes::Role TabbedPane::GetAccessibleRole() {
diff --git a/views/controls/tabbed_pane/tabbed_pane.h b/views/controls/tabbed_pane/tabbed_pane.h
index 3d8d227a..7c991c3 100644
--- a/views/controls/tabbed_pane/tabbed_pane.h
+++ b/views/controls/tabbed_pane/tabbed_pane.h
@@ -70,7 +70,7 @@ class TabbedPane : public View {
virtual std::string GetClassName() const;
virtual void Layout();
virtual void Focus();
- virtual void PaintFocusBorder(gfx::Canvas* canvas);
+ virtual void OnPaintFocusBorder(gfx::Canvas* canvas);
virtual AccessibilityTypes::Role GetAccessibleRole();
virtual gfx::Size GetPreferredSize();
diff --git a/views/controls/table/table_view2.cc b/views/controls/table/table_view2.cc
index 6359e25..52eef37 100644
--- a/views/controls/table/table_view2.cc
+++ b/views/controls/table/table_view2.cc
@@ -298,9 +298,9 @@ void TableView2::Layout() {
}
}
-void TableView2::PaintFocusBorder(gfx::Canvas* canvas) {
+void TableView2::OnPaintFocusBorder(gfx::Canvas* canvas) {
if (NativeViewHost::kRenderNativeControlFocus)
- View::PaintFocusBorder(canvas);
+ View::OnPaintFocusBorder(canvas);
}
size_t TableView2::GetVisibleColumnCount() {
diff --git a/views/controls/table/table_view2.h b/views/controls/table/table_view2.h
index b6b8234..a3cbb74 100644
--- a/views/controls/table/table_view2.h
+++ b/views/controls/table/table_view2.h
@@ -197,7 +197,7 @@ class TableView2 : public View, public TableModelObserver {
virtual void Layout();
- virtual void PaintFocusBorder(gfx::Canvas* canvas);
+ virtual void OnPaintFocusBorder(gfx::Canvas* canvas);
// Used by tests.
virtual gfx::NativeView GetTestingHandle();
diff --git a/views/controls/textfield/gtk_views_entry.cc b/views/controls/textfield/gtk_views_entry.cc
index caec272..d3a8bd0 100644
--- a/views/controls/textfield/gtk_views_entry.cc
+++ b/views/controls/textfield/gtk_views_entry.cc
@@ -23,7 +23,7 @@ static gint gtk_views_entry_expose_event(GtkWidget *widget,
if (event->window == widget->window) {
gfx::CanvasSkiaPaint canvas(event);
if (!canvas.is_empty() && host) {
- host->textfield()->PaintBackground(&canvas);
+ host->textfield()->OnPaintBackground(&canvas);
}
}
#endif
diff --git a/views/controls/textfield/native_textfield_views.cc b/views/controls/textfield/native_textfield_views.cc
index 0568eea..6e62f87 100644
--- a/views/controls/textfield/native_textfield_views.cc
+++ b/views/controls/textfield/native_textfield_views.cc
@@ -114,12 +114,12 @@ bool NativeTextfieldViews::OnKeyReleased(const views::KeyEvent& e) {
return false;
}
-void NativeTextfieldViews::Paint(gfx::Canvas* canvas) {
+void NativeTextfieldViews::OnPaint(gfx::Canvas* canvas) {
text_border_->set_has_focus(textfield_->HasFocus());
- PaintBackground(canvas);
+ OnPaintBackground(canvas);
PaintTextAndCursor(canvas);
if (textfield_->draw_border())
- PaintBorder(canvas);
+ OnPaintBorder(canvas);
}
void NativeTextfieldViews::OnBoundsChanged() {
diff --git a/views/controls/textfield/native_textfield_views.h b/views/controls/textfield/native_textfield_views.h
index 3a961fd..8f5764d 100644
--- a/views/controls/textfield/native_textfield_views.h
+++ b/views/controls/textfield/native_textfield_views.h
@@ -52,7 +52,7 @@ class NativeTextfieldViews : public views::View,
virtual void OnMouseReleased(const views::MouseEvent& e, bool canceled);
virtual bool OnKeyPressed(const views::KeyEvent& e);
virtual bool OnKeyReleased(const views::KeyEvent& e);
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
virtual void OnBoundsChanged();
virtual void WillGainFocus();
virtual void DidGainFocus();
diff --git a/views/controls/textfield/textfield.cc b/views/controls/textfield/textfield.cc
index e46d0f0..19f7d5d 100644
--- a/views/controls/textfield/textfield.cc
+++ b/views/controls/textfield/textfield.cc
@@ -324,9 +324,9 @@ bool Textfield::SkipDefaultKeyEventProcessing(const KeyEvent& e) {
return false;
}
-void Textfield::PaintFocusBorder(gfx::Canvas* canvas) {
+void Textfield::OnPaintFocusBorder(gfx::Canvas* canvas) {
if (NativeViewHost::kRenderNativeControlFocus)
- View::PaintFocusBorder(canvas);
+ View::OnPaintFocusBorder(canvas);
}
bool Textfield::OnKeyPressed(const views::KeyEvent& e) {
diff --git a/views/controls/textfield/textfield.h b/views/controls/textfield/textfield.h
index b0e6469..a25c327 100644
--- a/views/controls/textfield/textfield.h
+++ b/views/controls/textfield/textfield.h
@@ -263,7 +263,7 @@ class Textfield : public View {
virtual void AboutToRequestFocusFromTabTraversal(bool reverse);
virtual bool SkipDefaultKeyEventProcessing(const KeyEvent& e);
virtual void SetEnabled(bool enabled);
- virtual void PaintFocusBorder(gfx::Canvas* canvas);
+ virtual void OnPaintFocusBorder(gfx::Canvas* canvas);
virtual bool OnKeyPressed(const views::KeyEvent& e);
virtual bool OnKeyReleased(const views::KeyEvent& e);
virtual void WillGainFocus();
diff --git a/views/controls/throbber.cc b/views/controls/throbber.cc
index f80b3b0..19d42d2 100644
--- a/views/controls/throbber.cc
+++ b/views/controls/throbber.cc
@@ -70,7 +70,7 @@ gfx::Size Throbber::GetPreferredSize() {
return gfx::Size(frames_->height(), frames_->height());
}
-void Throbber::Paint(gfx::Canvas* canvas) {
+void Throbber::OnPaint(gfx::Canvas* canvas) {
if (!running_ && !paint_while_stopped_)
return;
@@ -146,10 +146,10 @@ void CheckmarkThrobber::SetChecked(bool checked) {
}
}
-void CheckmarkThrobber::Paint(gfx::Canvas* canvas) {
+void CheckmarkThrobber::OnPaint(gfx::Canvas* canvas) {
if (running_) {
// Let the throbber throb...
- Throbber::Paint(canvas);
+ Throbber::OnPaint(canvas);
return;
}
// Otherwise we paint our tick mark or nothing depending on our state.
diff --git a/views/controls/throbber.h b/views/controls/throbber.h
index d02623d..692482d 100644
--- a/views/controls/throbber.h
+++ b/views/controls/throbber.h
@@ -36,7 +36,7 @@ class Throbber : public View {
// overridden from View
virtual gfx::Size GetPreferredSize();
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
protected:
// Specifies whether the throbber is currently animating or not
@@ -105,7 +105,7 @@ class CheckmarkThrobber : public Throbber {
void SetChecked(bool checked);
// Overridden from Throbber:
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
private:
static const int kFrameTimeMs = 30;
diff --git a/views/view.cc b/views/view.cc
index 6ab44bf..594c6d9 100644
--- a/views/view.cc
+++ b/views/view.cc
@@ -629,23 +629,23 @@ void View::SchedulePaintInRect(const gfx::Rect& r, bool urgent) {
}
}
-void View::Paint(gfx::Canvas* canvas) {
- PaintBackground(canvas);
- PaintFocusBorder(canvas);
- PaintBorder(canvas);
+void View::OnPaint(gfx::Canvas* canvas) {
+ OnPaintBackground(canvas);
+ OnPaintFocusBorder(canvas);
+ OnPaintBorder(canvas);
}
-void View::PaintBackground(gfx::Canvas* canvas) {
+void View::OnPaintBackground(gfx::Canvas* canvas) {
if (background_.get())
background_->Paint(canvas, this);
}
-void View::PaintBorder(gfx::Canvas* canvas) {
+void View::OnPaintBorder(gfx::Canvas* canvas) {
if (border_.get())
border_->Paint(*this, canvas);
}
-void View::PaintFocusBorder(gfx::Canvas* canvas) {
+void View::OnPaintFocusBorder(gfx::Canvas* canvas) {
if (HasFocus() && (IsFocusable() || IsAccessibilityFocusableInRootView()))
canvas->DrawFocusRect(0, 0, width(), height());
}
@@ -689,7 +689,7 @@ void View::ProcessPaint(gfx::Canvas* canvas) {
canvas->ScaleInt(-1, 1);
}
- Paint(canvas);
+ OnPaint(canvas);
// We must undo the canvas mirroring once the View is done painting so that
// we don't pass the canvas with the mirrored transform to Views that
diff --git a/views/view.h b/views/view.h
index a9155b5..3b49068 100644
--- a/views/view.h
+++ b/views/view.h
@@ -522,28 +522,22 @@ class View : public AcceleratorTarget {
virtual void SchedulePaint();
virtual void SchedulePaintInRect(const gfx::Rect& r, bool urgent);
- // Paint the receiving view. g is prepared such as it is in
- // receiver's coordinate system. g's state is restored after this
- // call so your implementation can change the graphics configuration
- //
- // Default implementation paints the background if it is defined
- //
- // Override this method when implementing a new control.
- virtual void Paint(gfx::Canvas* canvas);
-
- // Paint the background if any. This method is called by Paint() and
- // should rarely be invoked directly.
- virtual void PaintBackground(gfx::Canvas* canvas);
-
- // Paint the border if any. This method is called by Paint() and
- // should rarely be invoked directly.
- virtual void PaintBorder(gfx::Canvas* canvas);
-
- // Paints the focus border (only if the view has the focus).
- // This method is called by Paint() and should rarely be invoked directly.
- // The default implementation paints a gray border around the view. Override
- // it for custom focus effects.
- virtual void PaintFocusBorder(gfx::Canvas* canvas);
+ // Override to provide rendering in any part of the View's bounds. Typically
+ // this is the "contents" of the view. If you override this method you will
+ // have to call the subsequent OnPaint*() methods manually.
+ virtual void OnPaint(gfx::Canvas* canvas);
+
+ // Override to paint a background before any content is drawn. Typically this
+ // is done if you are satisfied with a default OnPaint handler but wish to
+ // supply a different background.
+ virtual void OnPaintBackground(gfx::Canvas* canvas);
+
+ // Override to paint a border not specified by SetBorder().
+ virtual void OnPaintBorder(gfx::Canvas* canvas);
+
+ // Override to paint a focus border (usually a dotted rectangle) around
+ // relevant contents.
+ virtual void OnPaintFocusBorder(gfx::Canvas* canvas);
// Paint this View immediately.
virtual void PaintNow();
diff --git a/views/window/custom_frame_view.cc b/views/window/custom_frame_view.cc
index 9c7c616..cd687b7 100644
--- a/views/window/custom_frame_view.cc
+++ b/views/window/custom_frame_view.cc
@@ -206,7 +206,7 @@ void CustomFrameView::ResetWindowControls() {
///////////////////////////////////////////////////////////////////////////////
// CustomFrameView, View overrides:
-void CustomFrameView::Paint(gfx::Canvas* canvas) {
+void CustomFrameView::OnPaint(gfx::Canvas* canvas) {
if (frame_->IsMaximized())
PaintMaximizedFrameBorder(canvas);
else
diff --git a/views/window/custom_frame_view.h b/views/window/custom_frame_view.h
index e424f29..3c0517a 100644
--- a/views/window/custom_frame_view.h
+++ b/views/window/custom_frame_view.h
@@ -45,7 +45,7 @@ class CustomFrameView : public NonClientFrameView,
virtual void ResetWindowControls();
// View overrides:
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
virtual void Layout();
virtual gfx::Size GetPreferredSize();
diff --git a/views/window/dialog_client_view.cc b/views/window/dialog_client_view.cc
index a7f9078..730972e 100644
--- a/views/window/dialog_client_view.cc
+++ b/views/window/dialog_client_view.cc
@@ -300,7 +300,7 @@ int DialogClientView::NonClientHitTest(const gfx::Point& point) {
////////////////////////////////////////////////////////////////////////////////
// DialogClientView, View overrides:
-void DialogClientView::Paint(gfx::Canvas* canvas) {
+void DialogClientView::OnPaint(gfx::Canvas* canvas) {
#if defined(OS_WIN)
FillViewWithSysColor(canvas, this, GetSysColor(COLOR_3DFACE));
#else
diff --git a/views/window/dialog_client_view.h b/views/window/dialog_client_view.h
index 0f83186..d6d87a5 100644
--- a/views/window/dialog_client_view.h
+++ b/views/window/dialog_client_view.h
@@ -75,7 +75,7 @@ class DialogClientView : public ClientView,
protected:
// View overrides:
- virtual void Paint(gfx::Canvas* canvas);
+ virtual void OnPaint(gfx::Canvas* canvas);
virtual void PaintChildren(gfx::Canvas* canvas);
virtual void Layout();
virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child);