diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-16 14:13:08 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-16 14:13:08 +0000 |
commit | 16835e6886d84cf0e8c040550774ede0541222d9 (patch) | |
tree | af635f6df8d59ce1bb4fcbcf3441649f91be41b5 | |
parent | 9740d6ea63860a06a12ecd2b563a6b1d6d546818 (diff) | |
download | chromium_src-16835e6886d84cf0e8c040550774ede0541222d9.zip chromium_src-16835e6886d84cf0e8c040550774ede0541222d9.tar.gz chromium_src-16835e6886d84cf0e8c040550774ede0541222d9.tar.bz2 |
fav icon -> favicon. Pass 11: rest of chrome/browser/ui
BUG=76073
TEST=none; no visible change
Review URL: http://codereview.chromium.org/6698052
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78360 0039d316-1c4b-4281-b951-d872f2087c98
28 files changed, 86 insertions, 86 deletions
diff --git a/chrome/browser/extensions/extension_function_dispatcher.cc b/chrome/browser/extensions/extension_function_dispatcher.cc index f3c805d..943edcf 100644 --- a/chrome/browser/extensions/extension_function_dispatcher.cc +++ b/chrome/browser/extensions/extension_function_dispatcher.cc @@ -392,10 +392,10 @@ ExtensionFunctionDispatcher::ExtensionFunctionDispatcher( render_view_host->process()->id()); // If the extension has permission to load chrome://favicon/ resources we need - // to make sure that the FavIconSource is registered with the + // to make sure that the FaviconSource is registered with the // ChromeURLDataManager. if (extension->HasHostPermission(GURL(chrome::kChromeUIFavIconURL))) { - FavIconSource* favicon_source = new FavIconSource(profile_); + FaviconSource* favicon_source = new FaviconSource(profile_); profile_->GetChromeURLDataManager()->AddDataSource(favicon_source); } diff --git a/chrome/browser/possible_url_model.cc b/chrome/browser/possible_url_model.cc index d2f907e..bb49663 100644 --- a/chrome/browser/possible_url_model.cc +++ b/chrome/browser/possible_url_model.cc @@ -164,7 +164,7 @@ SkBitmap PossibleURLModel::GetIcon(int row) { CancelableRequestProvider::Handle h = favicon_service->GetFaviconForURL( result.url, &consumer_, - NewCallback(this, &PossibleURLModel::OnFavIconAvailable)); + NewCallback(this, &PossibleURLModel::OnFaviconAvailable)); consumer_.SetClientData(favicon_service, h, result.index); // Add an entry to the map so that we don't attempt to request the // favicon again. @@ -182,7 +182,7 @@ int PossibleURLModel::CompareValues(int row1, int row2, int column_id) { return ui::TableModel::CompareValues(row1, row2, column_id); } -void PossibleURLModel::OnFavIconAvailable( +void PossibleURLModel::OnFaviconAvailable( FaviconService::Handle h, bool favicon_available, scoped_refptr<RefCountedMemory> data, diff --git a/chrome/browser/possible_url_model.h b/chrome/browser/possible_url_model.h index 2a6e0ad0..a150a5b 100644 --- a/chrome/browser/possible_url_model.h +++ b/chrome/browser/possible_url_model.h @@ -36,7 +36,7 @@ class PossibleURLModel : public ui::TableModel { const GURL& GetURL(int row); const std::wstring& GetTitle(int row); - virtual void OnFavIconAvailable(FaviconService::Handle h, + virtual void OnFaviconAvailable(FaviconService::Handle h, bool favicon_available, scoped_refptr<RefCountedMemory> data, bool expired, diff --git a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc index 114d07c..122174a 100644 --- a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc +++ b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc @@ -38,7 +38,7 @@ const int kTopPadding = 6; const int kRightPadding = 15; const int kBottomPadding = 5; const int kDropShadowHeight = 2; -const int kFavIconTitleSpacing = 4; +const int kFaviconTitleSpacing = 4; const int kTitleCloseButtonSpacing = 5; const int kStandardTitleWidth = 175; const int kDropShadowOffset = 2; @@ -208,14 +208,14 @@ void TabRendererGtk::LoadingAnimation::Observe( // FaviconCrashAnimation // // A custom animation subclass to manage the favicon crash animation. -class TabRendererGtk::FavIconCrashAnimation : public ui::LinearAnimation, +class TabRendererGtk::FaviconCrashAnimation : public ui::LinearAnimation, public ui::AnimationDelegate { public: - explicit FavIconCrashAnimation(TabRendererGtk* target) + explicit FaviconCrashAnimation(TabRendererGtk* target) : ALLOW_THIS_IN_INITIALIZER_LIST(ui::LinearAnimation(1000, 25, this)), target_(target) { } - virtual ~FavIconCrashAnimation() {} + virtual ~FaviconCrashAnimation() {} // ui::Animation overrides: virtual void AnimateToState(double state) { @@ -225,7 +225,7 @@ class TabRendererGtk::FavIconCrashAnimation : public ui::LinearAnimation, target_->SetFaviconHidingOffset( static_cast<int>(floor(kHidingOffset * 2.0 * state))); } else { - target_->DisplayCrashedFavIcon(); + target_->DisplayCrashedFavicon(); target_->SetFaviconHidingOffset( static_cast<int>( floor(kHidingOffset - ((state - .5) * 2.0 * kHidingOffset)))); @@ -240,7 +240,7 @@ class TabRendererGtk::FavIconCrashAnimation : public ui::LinearAnimation, private: TabRendererGtk* target_; - DISALLOW_COPY_AND_ASSIGN(FavIconCrashAnimation); + DISALLOW_COPY_AND_ASSIGN(FaviconCrashAnimation); }; //////////////////////////////////////////////////////////////////////////////// @@ -327,7 +327,7 @@ void TabRendererGtk::UpdateFromModel() { } else { if (IsPerformingCrashAnimation()) StopCrashAnimation(); - ResetCrashedFavIcon(); + ResetCrashedFavicon(); } } @@ -364,7 +364,7 @@ bool TabRendererGtk::ValidateLoadingAnimation(AnimationState animation_state) { return loading_animation_.ValidateLoadingAnimation(animation_state); } -void TabRendererGtk::PaintFavIconArea(GdkEventExpose* event) { +void TabRendererGtk::PaintFaviconArea(GdkEventExpose* event) { DCHECK(ShouldShowIcon()); // The paint area is the favicon bounds, but we're painting into the gdk @@ -457,7 +457,7 @@ gfx::Size TabRendererGtk::GetMinimumSelectedSize() { // static gfx::Size TabRendererGtk::GetStandardSize() { gfx::Size standard_size = GetMinimumUnselectedSize(); - standard_size.Enlarge(kFavIconTitleSpacing + kStandardTitleWidth, 0); + standard_size.Enlarge(kFaviconTitleSpacing + kStandardTitleWidth, 0); return standard_size; } @@ -589,7 +589,7 @@ void TabRendererGtk::AnimationEnded(const ui::Animation* animation) { void TabRendererGtk::StartCrashAnimation() { if (!crash_animation_.get()) - crash_animation_.reset(new FavIconCrashAnimation(this)); + crash_animation_.reset(new FaviconCrashAnimation(this)); crash_animation_->Stop(); crash_animation_->Start(); } @@ -609,11 +609,11 @@ void TabRendererGtk::SetFaviconHidingOffset(int offset) { SchedulePaint(); } -void TabRendererGtk::DisplayCrashedFavIcon() { +void TabRendererGtk::DisplayCrashedFavicon() { should_display_crashed_favicon_ = true; } -void TabRendererGtk::ResetCrashedFavIcon() { +void TabRendererGtk::ResetCrashedFavicon() { should_display_crashed_favicon_ = false; } @@ -719,7 +719,7 @@ void TabRendererGtk::Layout() { if (!mini() || width() >= kMiniTabRendererAsNormalTabWidth) { // Size the Title text to fill the remaining space. - int title_left = favicon_bounds_.right() + kFavIconTitleSpacing; + int title_left = favicon_bounds_.right() + kFaviconTitleSpacing; int title_top = kTopPadding; // If the user has big fonts, the title will appear rendered too far down @@ -826,7 +826,7 @@ void TabRendererGtk::PaintIcon(gfx::Canvas* canvas) { PaintLoadingAnimation(canvas); } else { canvas->Save(); - canvas->ClipRectInt(0, 0, width(), height() - kFavIconTitleSpacing); + canvas->ClipRectInt(0, 0, width(), height() - kFaviconTitleSpacing); if (should_display_crashed_favicon_) { canvas->DrawBitmapInt(*crashed_favicon, 0, 0, crashed_favicon->width(), diff --git a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h index 0ffb763..43c6b36 100644 --- a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h +++ b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h @@ -172,7 +172,7 @@ class TabRendererGtk : public ui::AnimationDelegate, bool ValidateLoadingAnimation(AnimationState animation_state); // Repaint only the area of the tab that contains the favicon. - void PaintFavIconArea(GdkEventExpose* event); + void PaintFaviconArea(GdkEventExpose* event); // Returns whether the Tab should display a favicon. bool ShouldShowIcon() const; @@ -239,7 +239,7 @@ class TabRendererGtk : public ui::AnimationDelegate, GdkEventCrossing*); private: - class FavIconCrashAnimation; + class FaviconCrashAnimation; // The data structure used to hold cached bitmaps. We need to manually free // the bitmap in CachedBitmap when we remove it from |cached_bitmaps_|. We @@ -306,8 +306,8 @@ class TabRendererGtk : public ui::AnimationDelegate, // Set the temporary offset for the favicon. This is used during animation. void SetFaviconHidingOffset(int offset); - void DisplayCrashedFavIcon(); - void ResetCrashedFavIcon(); + void DisplayCrashedFavicon(); + void ResetCrashedFavicon(); // Generates the bounds for the interior items of the tab. void Layout(); @@ -410,7 +410,7 @@ class TabRendererGtk : public ui::AnimationDelegate, int favicon_hiding_offset_; // The animation object used to swap the favicon with the sad tab icon. - scoped_ptr<FavIconCrashAnimation> crash_animation_; + scoped_ptr<FaviconCrashAnimation> crash_animation_; // Set when the crashed favicon should be displayed. bool should_display_crashed_favicon_; diff --git a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc index 7d76b8c..383fbf0 100644 --- a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc +++ b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc @@ -91,7 +91,7 @@ int CompareGdkRectangles(const void* p1, const void* p2) { return 1; } -bool GdkRectMatchesTabFavIconBounds(const GdkRectangle& gdk_rect, TabGtk* tab) { +bool GdkRectMatchesTabFaviconBounds(const GdkRectangle& gdk_rect, TabGtk* tab) { gfx::Rect favicon_bounds = tab->favicon_bounds(); return gdk_rect.x == favicon_bounds.x() + tab->x() && gdk_rect.y == favicon_bounds.y() + tab->y() && @@ -1874,8 +1874,8 @@ gboolean TabStripGtk::OnExpose(GtkWidget* widget, GdkEventExpose* event) { qsort(rects, num_rects, sizeof(GdkRectangle), CompareGdkRectangles); std::vector<int> tabs_to_repaint; if (!IsDragSessionActive() && - CanPaintOnlyFavIcons(rects, num_rects, &tabs_to_repaint)) { - PaintOnlyFavIcons(event, tabs_to_repaint); + CanPaintOnlyFavicons(rects, num_rects, &tabs_to_repaint)) { + PaintOnlyFavicons(event, tabs_to_repaint); g_free(rects); return TRUE; } @@ -2025,7 +2025,7 @@ void TabStripGtk::SetTabBounds(TabGtk* tab, const gfx::Rect& bounds) { bds.x(), bds.y()); } -bool TabStripGtk::CanPaintOnlyFavIcons(const GdkRectangle* rects, +bool TabStripGtk::CanPaintOnlyFavicons(const GdkRectangle* rects, int num_rects, std::vector<int>* tabs_to_paint) { // |rects| are sorted so we just need to scan from left to right and compare // it to the tab favicon positions from left to right. @@ -2033,7 +2033,7 @@ bool TabStripGtk::CanPaintOnlyFavIcons(const GdkRectangle* rects, for (int r = 0; r < num_rects; ++r) { while (t < GetTabCount()) { TabGtk* tab = GetTabAt(t); - if (GdkRectMatchesTabFavIconBounds(rects[r], tab) && + if (GdkRectMatchesTabFaviconBounds(rects[r], tab) && tab->ShouldShowIcon()) { tabs_to_paint->push_back(t); ++t; @@ -2045,10 +2045,10 @@ bool TabStripGtk::CanPaintOnlyFavIcons(const GdkRectangle* rects, return static_cast<int>(tabs_to_paint->size()) == num_rects; } -void TabStripGtk::PaintOnlyFavIcons(GdkEventExpose* event, +void TabStripGtk::PaintOnlyFavicons(GdkEventExpose* event, const std::vector<int>& tabs_to_paint) { for (size_t i = 0; i < tabs_to_paint.size(); ++i) - GetTabAt(tabs_to_paint[i])->PaintFavIconArea(event); + GetTabAt(tabs_to_paint[i])->PaintFaviconArea(event); } CustomDrawButton* TabStripGtk::MakeNewTabButton() { diff --git a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.h b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.h index d1dd1aa..c3391ba 100644 --- a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.h +++ b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.h @@ -260,12 +260,12 @@ class TabStripGtk : public TabStripModelObserver, // Returns true if |rects| are all areas that match up with tab favicons. // |rects| must be sorted from left to right. |tabs_to_paint| are the tab // positions that match the rects. - bool CanPaintOnlyFavIcons(const GdkRectangle* rects, + bool CanPaintOnlyFavicons(const GdkRectangle* rects, int num_rects, std::vector<int>* tabs_to_paint); // Paints the tab favicon areas for tabs in |tabs_to_paint|. - void PaintOnlyFavIcons(GdkEventExpose* event, + void PaintOnlyFavicons(GdkEventExpose* event, const std::vector<int>& tabs_to_paint); // Initializes the new tab button. diff --git a/chrome/browser/ui/search_engines/template_url_table_model.cc b/chrome/browser/ui/search_engines/template_url_table_model.cc index 31039c5..59388ab 100644 --- a/chrome/browser/ui/search_engines/template_url_table_model.cc +++ b/chrome/browser/ui/search_engines/template_url_table_model.cc @@ -105,7 +105,7 @@ class ModelEntry { load_state_ = LOADED; if (know_favicon && data.get() && gfx::PNGCodec::Decode(data->front(), data->size(), &favicon_)) { - model_->FavIconAvailable(this); + model_->FaviconAvailable(this); } } @@ -369,7 +369,7 @@ void TemplateURLTableModel::NotifyChanged(int index) { } } -void TemplateURLTableModel::FavIconAvailable(ModelEntry* entry) { +void TemplateURLTableModel::FaviconAvailable(ModelEntry* entry) { std::vector<ModelEntry*>::iterator i = find(entries_.begin(), entries_.end(), entry); DCHECK(i != entries_.end()); diff --git a/chrome/browser/ui/search_engines/template_url_table_model.h b/chrome/browser/ui/search_engines/template_url_table_model.h index c002908..d99a5dd 100644 --- a/chrome/browser/ui/search_engines/template_url_table_model.h +++ b/chrome/browser/ui/search_engines/template_url_table_model.h @@ -93,7 +93,7 @@ class TemplateURLTableModel : public ui::TableModel, friend class ModelEntry; // Notification that a model entry has fetched its icon. - void FavIconAvailable(ModelEntry* entry); + void FaviconAvailable(ModelEntry* entry); // TemplateURLModelObserver notification. virtual void OnTemplateURLModelChanged(); diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc index 9ed449d..b6e917f 100644 --- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc +++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc @@ -87,7 +87,7 @@ static const int kButtonPadding = 0; static const int kAlwaysShowCommandID = 1; // Icon to display when one isn't found for the page. -static SkBitmap* kDefaultFavIcon = NULL; +static SkBitmap* kDefaultFavicon = NULL; // Icon used for folders. static SkBitmap* kFolderIcon = NULL; @@ -860,8 +860,8 @@ void BookmarkBarView::Init() { ResourceBundle& rb = ResourceBundle::GetSharedInstance(); - if (!kDefaultFavIcon) - kDefaultFavIcon = rb.GetBitmapNamed(IDR_DEFAULT_FAVICON); + if (!kDefaultFavicon) + kDefaultFavicon = rb.GetBitmapNamed(IDR_DEFAULT_FAVICON); // Child views are traversed in the order they are added. Make sure the order // they are added matches the visual order. @@ -1268,7 +1268,7 @@ void BookmarkBarView::ConfigureButton(const BookmarkNode* node, if (model_->GetFavicon(node).width() != 0) button->SetIcon(model_->GetFavicon(node)); else - button->SetIcon(*kDefaultFavIcon); + button->SetIcon(*kDefaultFavicon); } button->set_max_width(kMaxButtonWidth); } diff --git a/chrome/browser/ui/views/tab_icon_view.cc b/chrome/browser/ui/views/tab_icon_view.cc index d486a87..2819a95 100644 --- a/chrome/browser/ui/views/tab_icon_view.cc +++ b/chrome/browser/ui/views/tab_icon_view.cc @@ -96,7 +96,7 @@ void TabIconView::PaintThrobber(gfx::Canvas* canvas) { image_size, false); } -void TabIconView::PaintFavIcon(gfx::Canvas* canvas, const SkBitmap& bitmap) { +void TabIconView::PaintFavicon(gfx::Canvas* canvas, const SkBitmap& bitmap) { PaintIcon(canvas, bitmap, 0, 0, bitmap.width(), bitmap.height(), true); } @@ -142,12 +142,12 @@ void TabIconView::OnPaint(gfx::Canvas* canvas) { SkBitmap favicon = model_->GetFaviconForTabIconView(); if (!favicon.isNull()) { rendered = true; - PaintFavIcon(canvas, favicon); + PaintFavicon(canvas, favicon); } } if (!rendered) - PaintFavIcon(canvas, *g_default_favicon); + PaintFavicon(canvas, *g_default_favicon); } gfx::Size TabIconView::GetPreferredSize() { diff --git a/chrome/browser/ui/views/tab_icon_view.h b/chrome/browser/ui/views/tab_icon_view.h index 9080dc4..2ac35d5 100644 --- a/chrome/browser/ui/views/tab_icon_view.h +++ b/chrome/browser/ui/views/tab_icon_view.h @@ -45,7 +45,7 @@ class TabIconView : public views::View { private: void PaintThrobber(gfx::Canvas* canvas); - void PaintFavIcon(gfx::Canvas* canvas, const SkBitmap& bitmap); + void PaintFavicon(gfx::Canvas* canvas, const SkBitmap& bitmap); void PaintIcon(gfx::Canvas* canvas, const SkBitmap& bitmap, int src_x, diff --git a/chrome/browser/ui/views/tabs/base_tab.cc b/chrome/browser/ui/views/tabs/base_tab.cc index 9f7c658..acd13a4 100644 --- a/chrome/browser/ui/views/tabs/base_tab.cc +++ b/chrome/browser/ui/views/tabs/base_tab.cc @@ -105,14 +105,14 @@ int BaseTab::font_height_ = 0; // FaviconCrashAnimation // // A custom animation subclass to manage the favicon crash animation. -class BaseTab::FavIconCrashAnimation : public ui::LinearAnimation, +class BaseTab::FaviconCrashAnimation : public ui::LinearAnimation, public ui::AnimationDelegate { public: - explicit FavIconCrashAnimation(BaseTab* target) + explicit FaviconCrashAnimation(BaseTab* target) : ALLOW_THIS_IN_INITIALIZER_LIST(ui::LinearAnimation(1000, 25, this)), target_(target) { } - virtual ~FavIconCrashAnimation() {} + virtual ~FaviconCrashAnimation() {} // ui::Animation overrides: virtual void AnimateToState(double state) { @@ -122,7 +122,7 @@ class BaseTab::FavIconCrashAnimation : public ui::LinearAnimation, target_->SetFaviconHidingOffset( static_cast<int>(floor(kHidingOffset * 2.0 * state))); } else { - target_->DisplayCrashedFavIcon(); + target_->DisplayCrashedFavicon(); target_->SetFaviconHidingOffset( static_cast<int>( floor(kHidingOffset - ((state - .5) * 2.0 * kHidingOffset)))); @@ -137,7 +137,7 @@ class BaseTab::FavIconCrashAnimation : public ui::LinearAnimation, private: BaseTab* target_; - DISALLOW_COPY_AND_ASSIGN(FavIconCrashAnimation); + DISALLOW_COPY_AND_ASSIGN(FaviconCrashAnimation); }; BaseTab::BaseTab(TabController* controller) @@ -211,7 +211,7 @@ void BaseTab::SetData(const TabRendererData& data) { } else { if (IsPerformingCrashAnimation()) StopCrashAnimation(); - ResetCrashedFavIcon(); + ResetCrashedFavicon(); } DataChanged(old); @@ -523,17 +523,17 @@ void BaseTab::SetFaviconHidingOffset(int offset) { ScheduleIconPaint(); } -void BaseTab::DisplayCrashedFavIcon() { +void BaseTab::DisplayCrashedFavicon() { should_display_crashed_favicon_ = true; } -void BaseTab::ResetCrashedFavIcon() { +void BaseTab::ResetCrashedFavicon() { should_display_crashed_favicon_ = false; } void BaseTab::StartCrashAnimation() { if (!crash_animation_.get()) - crash_animation_.reset(new FavIconCrashAnimation(this)); + crash_animation_.reset(new FaviconCrashAnimation(this)); crash_animation_->Stop(); crash_animation_->Start(); } diff --git a/chrome/browser/ui/views/tabs/base_tab.h b/chrome/browser/ui/views/tabs/base_tab.h index 10efd1f..18ce5e2 100644 --- a/chrome/browser/ui/views/tabs/base_tab.h +++ b/chrome/browser/ui/views/tabs/base_tab.h @@ -146,14 +146,14 @@ class BaseTab : public ui::AnimationDelegate, private: // The animation object used to swap the favicon with the sad tab icon. - class FavIconCrashAnimation; + class FaviconCrashAnimation; // Set the temporary offset for the favicon. This is used during the crash // animation. void SetFaviconHidingOffset(int offset); - void DisplayCrashedFavIcon(); - void ResetCrashedFavIcon(); + void DisplayCrashedFavicon(); + void ResetCrashedFavicon(); // Starts/Stops the crash animation. void StartCrashAnimation(); @@ -195,7 +195,7 @@ class BaseTab : public ui::AnimationDelegate, scoped_ptr<ui::SlideAnimation> hover_animation_; // Crash animation. - scoped_ptr<FavIconCrashAnimation> crash_animation_; + scoped_ptr<FaviconCrashAnimation> crash_animation_; scoped_refptr<ui::AnimationContainer> animation_container_; diff --git a/chrome/browser/ui/views/tabs/tab.cc b/chrome/browser/ui/views/tabs/tab.cc index 0913d5b..104171d 100644 --- a/chrome/browser/ui/views/tabs/tab.cc +++ b/chrome/browser/ui/views/tabs/tab.cc @@ -34,7 +34,7 @@ static const int kRightPadding = 15; static const int kBottomPadding = 5; static const int kDropShadowHeight = 2; static const int kToolbarOverlap = 1; -static const int kFavIconTitleSpacing = 4; +static const int kFaviconTitleSpacing = 4; static const int kTitleCloseButtonSpacing = 5; static const int kStandardTitleWidth = 175; static const int kCloseButtonVertFuzz = 0; @@ -151,7 +151,7 @@ gfx::Size Tab::GetMinimumSelectedSize() { gfx::Size Tab::GetStandardSize() { gfx::Size standard_size = GetMinimumUnselectedSize(); standard_size.set_width( - standard_size.width() + kFavIconTitleSpacing + kStandardTitleWidth); + standard_size.width() + kFaviconTitleSpacing + kStandardTitleWidth); return standard_size; } @@ -272,7 +272,7 @@ void Tab::Layout() { close_button()->SetVisible(false); } - int title_left = favicon_bounds_.right() + kFavIconTitleSpacing; + int title_left = favicon_bounds_.right() + kFaviconTitleSpacing; int title_top = kTopPadding + (content_height - font_height()) / 2; // Size the Title text to fill the remaining space. if (!data().mini || width() >= kMiniTabRendererAsNormalTabWidth) { diff --git a/chrome/browser/ui/webui/chrome_url_data_manager.h b/chrome/browser/ui/webui/chrome_url_data_manager.h index c0796b4..991c1f0 100644 --- a/chrome/browser/ui/webui/chrome_url_data_manager.h +++ b/chrome/browser/ui/webui/chrome_url_data_manager.h @@ -147,7 +147,7 @@ class ChromeURLDataManager { // as there are no other references to it. |DataSource| uses the // |DeleteOnUIThread| trait to insure that the destructor is called on the UI // thread. This is necessary as some |DataSource|s notably |FileIconSource| - // and |FavIconSource|, have members that will DCHECK if they are not + // and |FaviconSource|, have members that will DCHECK if they are not // destructed in the same thread as they are constructed (the UI thread). void AddDataSource(DataSource* source); diff --git a/chrome/browser/ui/webui/favicon_source.cc b/chrome/browser/ui/webui/favicon_source.cc index f70ab08..4e0adc3 100644 --- a/chrome/browser/ui/webui/favicon_source.cc +++ b/chrome/browser/ui/webui/favicon_source.cc @@ -10,15 +10,15 @@ #include "grit/app_resources.h" #include "ui/base/resource/resource_bundle.h" -FavIconSource::FavIconSource(Profile* profile) - : DataSource(chrome::kChromeUIFavIconHost, MessageLoop::current()), +FaviconSource::FaviconSource(Profile* profile) + : DataSource(chrome::kChromeUIFaviconHost, MessageLoop::current()), profile_(profile->GetOriginalProfile()) { } -FavIconSource::~FavIconSource() { +FaviconSource::~FaviconSource() { } -void FavIconSource::StartDataRequest(const std::string& path, +void FaviconSource::StartDataRequest(const std::string& path, bool is_off_the_record, int request_id) { FaviconService* favicon_service = @@ -34,12 +34,12 @@ void FavIconSource::StartDataRequest(const std::string& path, handle = favicon_service->GetFavicon( GURL(path.substr(8)), &cancelable_consumer_, - NewCallback(this, &FavIconSource::OnFaviconDataAvailable)); + NewCallback(this, &FaviconSource::OnFaviconDataAvailable)); } else { handle = favicon_service->GetFaviconForURL( GURL(path), &cancelable_consumer_, - NewCallback(this, &FavIconSource::OnFaviconDataAvailable)); + NewCallback(this, &FaviconSource::OnFaviconDataAvailable)); } // Attach the ChromeURLDataManager request ID to the history request. cancelable_consumer_.SetClientData(favicon_service, handle, request_id); @@ -48,19 +48,19 @@ void FavIconSource::StartDataRequest(const std::string& path, } } -std::string FavIconSource::GetMimeType(const std::string&) const { +std::string FaviconSource::GetMimeType(const std::string&) const { // We need to explicitly return a mime type, otherwise if the user tries to // drag the image they get no extension. return "image/png"; } -bool FavIconSource::ShouldReplaceExistingSource() const { +bool FaviconSource::ShouldReplaceExistingSource() const { // Leave the existing DataSource in place, otherwise we'll drop any pending // requests on the floor. return false; } -void FavIconSource::OnFaviconDataAvailable( +void FaviconSource::OnFaviconDataAvailable( FaviconService::Handle request_handle, bool know_favicon, scoped_refptr<RefCountedMemory> data, @@ -79,7 +79,7 @@ void FavIconSource::OnFaviconDataAvailable( } } -void FavIconSource::SendDefaultResponse(int request_id) { +void FaviconSource::SendDefaultResponse(int request_id) { if (!default_favicon_.get()) { default_favicon_ = ResourceBundle::GetSharedInstance().LoadDataResourceBytes( diff --git a/chrome/browser/ui/webui/favicon_source.h b/chrome/browser/ui/webui/favicon_source.h index b84982b..7620d24 100644 --- a/chrome/browser/ui/webui/favicon_source.h +++ b/chrome/browser/ui/webui/favicon_source.h @@ -16,11 +16,11 @@ class GURL; class Profile; -// FavIconSource is the gateway between network-level chrome: +// FaviconSource is the gateway between network-level chrome: // requests for favicons and the history backend that serves these. -class FavIconSource : public ChromeURLDataManager::DataSource { +class FaviconSource : public ChromeURLDataManager::DataSource { public: - explicit FavIconSource(Profile* profile); + explicit FaviconSource(Profile* profile); // Called when the network layer has requested a resource underneath // the path we registered. @@ -43,7 +43,7 @@ class FavIconSource : public ChromeURLDataManager::DataSource { // Sends the default favicon. void SendDefaultResponse(int request_id); - virtual ~FavIconSource(); + virtual ~FaviconSource(); Profile* profile_; CancelableRequestConsumerT<int, 0> cancelable_consumer_; @@ -52,7 +52,7 @@ class FavIconSource : public ChromeURLDataManager::DataSource { // database doesn't have a favicon for a webpage. scoped_refptr<RefCountedMemory> default_favicon_; - DISALLOW_COPY_AND_ASSIGN(FavIconSource); + DISALLOW_COPY_AND_ASSIGN(FaviconSource); }; #endif // CHROME_BROWSER_UI_WEBUI_FAVICON_SOURCE_H_ diff --git a/chrome/browser/ui/webui/filebrowse_ui.cc b/chrome/browser/ui/webui/filebrowse_ui.cc index 5020cd1..0a61e69 100644 --- a/chrome/browser/ui/webui/filebrowse_ui.cc +++ b/chrome/browser/ui/webui/filebrowse_ui.cc @@ -446,7 +446,7 @@ WebUIMessageHandler* FilebrowseHandler::Attach(WebUI* web_ui) { // Create our favicon data source. profile_ = web_ui->GetProfile(); profile_->GetChromeURLDataManager()->AddDataSource( - new FavIconSource(profile_)); + new FaviconSource(profile_)); tab_contents_ = web_ui->tab_contents(); return WebUIMessageHandler::Attach(web_ui); } diff --git a/chrome/browser/ui/webui/history2_ui.cc b/chrome/browser/ui/webui/history2_ui.cc index 5b253f8..b9f6aca 100644 --- a/chrome/browser/ui/webui/history2_ui.cc +++ b/chrome/browser/ui/webui/history2_ui.cc @@ -131,7 +131,7 @@ WebUIMessageHandler* BrowsingHistoryHandler2::Attach(WebUI* web_ui) { // Create our favicon data source. Profile* profile = web_ui->GetProfile(); profile->GetChromeURLDataManager()->AddDataSource( - new FavIconSource(profile)); + new FaviconSource(profile)); // Get notifications when history is cleared. registrar_.Add(this, NotificationType::HISTORY_URLS_DELETED, diff --git a/chrome/browser/ui/webui/history_ui.cc b/chrome/browser/ui/webui/history_ui.cc index 8f30902..35ce750 100644 --- a/chrome/browser/ui/webui/history_ui.cc +++ b/chrome/browser/ui/webui/history_ui.cc @@ -131,7 +131,7 @@ WebUIMessageHandler* BrowsingHistoryHandler::Attach(WebUI* web_ui) { // Create our favicon data source. Profile* profile = web_ui->GetProfile(); profile->GetChromeURLDataManager()->AddDataSource( - new FavIconSource(profile)); + new FaviconSource(profile)); // Get notifications when history is cleared. registrar_.Add(this, NotificationType::HISTORY_URLS_DELETED, diff --git a/chrome/browser/ui/webui/mediaplayer_ui.cc b/chrome/browser/ui/webui/mediaplayer_ui.cc index 2b6aa78..174078a 100644 --- a/chrome/browser/ui/webui/mediaplayer_ui.cc +++ b/chrome/browser/ui/webui/mediaplayer_ui.cc @@ -211,7 +211,7 @@ WebUIMessageHandler* MediaplayerHandler::Attach(WebUI* web_ui) { // Create our favicon data source. Profile* profile = web_ui->GetProfile(); profile->GetChromeURLDataManager()->AddDataSource( - new FavIconSource(profile)); + new FaviconSource(profile)); return WebUIMessageHandler::Attach(web_ui); } diff --git a/chrome/browser/ui/webui/most_visited_handler.cc b/chrome/browser/ui/webui/most_visited_handler.cc index a12ea0a..9c4bb1d 100644 --- a/chrome/browser/ui/webui/most_visited_handler.cc +++ b/chrome/browser/ui/webui/most_visited_handler.cc @@ -73,7 +73,7 @@ WebUIMessageHandler* MostVisitedHandler::Attach(WebUI* web_ui) { ThumbnailSource* thumbnail_src = new ThumbnailSource(profile); profile->GetChromeURLDataManager()->AddDataSource(thumbnail_src); - FavIconSource* favicon_src = new FavIconSource(profile); + FaviconSource* favicon_src = new FaviconSource(profile); profile->GetChromeURLDataManager()->AddDataSource(favicon_src); // Get notifications when history is cleared. diff --git a/chrome/browser/ui/webui/options/browser_options_handler.cc b/chrome/browser/ui/webui/options/browser_options_handler.cc index d407f06..a6865d2 100644 --- a/chrome/browser/ui/webui/options/browser_options_handler.cc +++ b/chrome/browser/ui/webui/options/browser_options_handler.cc @@ -113,7 +113,7 @@ void BrowserOptionsHandler::Initialize() { // Create our favicon data source. profile->GetChromeURLDataManager()->AddDataSource( - new FavIconSource(profile)); + new FaviconSource(profile)); homepage_.Init(prefs::kHomePage, profile->GetPrefs(), NULL); default_browser_policy_.Init(prefs::kDefaultBrowserSettingEnabled, diff --git a/chrome/browser/ui/webui/slideshow_ui.cc b/chrome/browser/ui/webui/slideshow_ui.cc index 9b60864..81099b1 100644 --- a/chrome/browser/ui/webui/slideshow_ui.cc +++ b/chrome/browser/ui/webui/slideshow_ui.cc @@ -151,7 +151,7 @@ WebUIMessageHandler* SlideshowHandler::Attach(WebUI* web_ui) { profile_ = web_ui->GetProfile(); // Create our favicon data source. profile_->GetChromeURLDataManager()->AddDataSource( - new FavIconSource(profile_)); + new FaviconSource(profile_)); return WebUIMessageHandler::Attach(web_ui); } diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc index c86ba40..0e68d4d 100644 --- a/chrome/common/extensions/extension.cc +++ b/chrome/common/extensions/extension.cc @@ -2307,7 +2307,7 @@ bool Extension::CanSpecifyHostPermission(const URLPattern& pattern) const { pattern.MatchesScheme(chrome::kChromeUIScheme)) { // Only allow access to chrome://favicon to regular extensions. Component // extensions can have access to all of chrome://*. - return (pattern.host() == chrome::kChromeUIFavIconHost || + return (pattern.host() == chrome::kChromeUIFaviconHost || CanExecuteScriptEverywhere()); } diff --git a/chrome/common/url_constants.cc b/chrome/common/url_constants.cc index db565a5..00a08d5 100644 --- a/chrome/common/url_constants.cc +++ b/chrome/common/url_constants.cc @@ -122,7 +122,7 @@ const char kChromeUIDialogHost[] = "dialog"; const char kChromeUIDownloadsHost[] = "downloads"; const char kChromeUIExtensionIconHost[] = "extension-icon"; const char kChromeUIExtensionsHost[] = "extensions"; -const char kChromeUIFavIconHost[] = "favicon"; +const char kChromeUIFaviconHost[] = "favicon"; const char kChromeUIFlagsHost[] = "flags"; const char kChromeUIGpuInternalsHost[] = "gpu-internals"; const char kChromeUIHistoryHost[] = "history"; diff --git a/chrome/common/url_constants.h b/chrome/common/url_constants.h index ae5c3da..a5ea5e9 100644 --- a/chrome/common/url_constants.h +++ b/chrome/common/url_constants.h @@ -115,7 +115,7 @@ extern const char kChromeUIDialogHost[]; extern const char kChromeUIDownloadsHost[]; extern const char kChromeUIExtensionIconHost[]; extern const char kChromeUIExtensionsHost[]; -extern const char kChromeUIFavIconHost[]; +extern const char kChromeUIFaviconHost[]; extern const char kChromeUIFlagsHost[]; extern const char kChromeUIGpuInternalsHost[]; extern const char kChromeUIHistory2Host[]; |