diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-24 19:20:01 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-24 19:20:01 +0000 |
commit | 9091fb63ab0a815870f6731dd6113e17c59c093e (patch) | |
tree | 1d9aa358353355d536e922f38f3450cb4c6cc4d6 /chrome | |
parent | 953937272a6de26b3391058390c5f4e2947e6b0c (diff) | |
download | chromium_src-9091fb63ab0a815870f6731dd6113e17c59c093e.zip chromium_src-9091fb63ab0a815870f6731dd6113e17c59c093e.tar.gz chromium_src-9091fb63ab0a815870f6731dd6113e17c59c093e.tar.bz2 |
Remove TopSites dependency from content/ in anticipation of pulling it out of Profile.
(Also remove another BrowserThemeProvider reference)
BUG=77155
TEST=compiles
Review URL: http://codereview.chromium.org/6733009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79305 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/ui/tab_contents/tab_contents_wrapper.cc | 14 | ||||
-rw-r--r-- | chrome/browser/ui/tab_contents/tab_contents_wrapper.h | 3 | ||||
-rw-r--r-- | chrome/test/testing_profile.cc | 4 | ||||
-rw-r--r-- | chrome/test/testing_profile.h | 4 |
4 files changed, 17 insertions, 8 deletions
diff --git a/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc b/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc index 4070e32..b5db568e 100644 --- a/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc +++ b/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc @@ -11,6 +11,7 @@ #include "chrome/browser/custom_handlers/protocol_handler_registry.h" #include "chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.h" #include "chrome/browser/file_select_helper.h" +#include "chrome/browser/history/top_sites.h" #include "chrome/browser/password_manager/password_manager.h" #include "chrome/browser/password_manager_delegate_impl.h" #include "chrome/browser/prefs/pref_service.h" @@ -206,6 +207,7 @@ bool TabContentsWrapper::OnMessageReceived(const IPC::Message& message) { IPC_MESSAGE_HANDLER(ViewHostMsg_JSOutOfMemory, OnJSOutOfMemory) IPC_MESSAGE_HANDLER(ViewHostMsg_RegisterProtocolHandler, OnRegisterProtocolHandler) + IPC_MESSAGE_HANDLER(ViewHostMsg_Thumbnail, OnMsgThumbnail) IPC_MESSAGE_UNHANDLED(handled = false) IPC_END_MESSAGE_MAP() return handled; @@ -262,6 +264,18 @@ void TabContentsWrapper::OnRegisterProtocolHandler(const std::string& protocol, } } +void TabContentsWrapper::OnMsgThumbnail(const GURL& url, + const ThumbnailScore& score, + const SkBitmap& bitmap) { + if (profile()->IsOffTheRecord()) + return; + + // Tell History about this thumbnail + history::TopSites* ts = profile()->GetTopSites(); + if (ts) + ts->SetPageThumbnail(url, bitmap, score); +} + void TabContentsWrapper::UpdateStarredStateForCurrentURL() { BookmarkModel* model = tab_contents()->profile()->GetBookmarkModel(); const bool old_state = is_starred_; diff --git a/chrome/browser/ui/tab_contents/tab_contents_wrapper.h b/chrome/browser/ui/tab_contents/tab_contents_wrapper.h index d618518..5adcbc2 100644 --- a/chrome/browser/ui/tab_contents/tab_contents_wrapper.h +++ b/chrome/browser/ui/tab_contents/tab_contents_wrapper.h @@ -130,6 +130,9 @@ class TabContentsWrapper : public NotificationObserver, void OnRegisterProtocolHandler(const std::string& protocol, const GURL& url, const string16& title); + void OnMsgThumbnail(const GURL& url, + const ThumbnailScore& score, + const SkBitmap& bitmap); // Updates the starred state from the bookmark bar model. If the state has // changed, the delegate is notified. diff --git a/chrome/test/testing_profile.cc b/chrome/test/testing_profile.cc index 484d780..551b0a3 100644 --- a/chrome/test/testing_profile.cc +++ b/chrome/test/testing_profile.cc @@ -323,10 +323,6 @@ void TestingProfile::SetTemplateURLModel(TemplateURLModel* model) { template_url_model_.reset(model); } -void TestingProfile::UseThemeProvider(ThemeService* theme_provider) { - NOTREACHED() << "This needs to go away for a different testing interface."; -} - ExtensionService* TestingProfile::CreateExtensionService( const CommandLine* command_line, const FilePath& install_directory) { diff --git a/chrome/test/testing_profile.h b/chrome/test/testing_profile.h index 91d63aa..248ef89 100644 --- a/chrome/test/testing_profile.h +++ b/chrome/test/testing_profile.h @@ -113,10 +113,6 @@ class TestingProfile : public Profile { // Sets the TemplateURLModel. Takes ownership of it. void SetTemplateURLModel(TemplateURLModel* model); - // Uses a specific theme provider for this profile. TestingProfile takes - // ownership of |theme_provider|. - void UseThemeProvider(ThemeService* theme_provider); - // Creates an ExtensionService initialized with the testing profile and // returns it. The profile keeps its own copy of a scoped_refptr to the // ExtensionService to make sure that is still alive to be notified when the |