Chromium Code Reviews| Index: athena/content/web_activity.cc |
| diff --git a/athena/content/web_activity.cc b/athena/content/web_activity.cc |
| index 2aae6e86b5f5a80e419906a4af7878e450a88aa1..ca85ae0dd4d4afdec365a0e737e026607da6a45b 100644 |
| --- a/athena/content/web_activity.cc |
| +++ b/athena/content/web_activity.cc |
| @@ -6,6 +6,7 @@ |
| #include "athena/activity/public/activity_factory.h" |
| #include "athena/activity/public/activity_manager.h" |
| +#include "athena/activity/public/activity_view.h" |
| #include "athena/content/content_proxy.h" |
| #include "athena/content/media_utils.h" |
| #include "athena/content/public/dialogs.h" |
| @@ -557,6 +558,10 @@ gfx::ImageSkia WebActivity::GetIcon() const { |
| return icon_; |
| } |
| +void WebActivity::SetActivityView(ActivityView* view) { |
|
oshima
2014/11/04 22:17:04
ditto
sadrul
2014/11/04 23:26:09
Done.
|
| + activity_view_ = view; |
| +} |
| + |
| bool WebActivity::UsesFrame() const { |
| return true; |
| } |
| @@ -589,7 +594,8 @@ void WebActivity::ResetContentsView() { |
| void WebActivity::TitleWasSet(content::NavigationEntry* entry, |
| bool explicit_set) { |
| - ActivityManager::Get()->UpdateActivity(this); |
| + if (activity_view_) |
| + activity_view_->UpdateTitle(); |
| } |
| void WebActivity::DidNavigateMainFrame( |
| @@ -599,7 +605,8 @@ void WebActivity::DidNavigateMainFrame( |
| weak_ptr_factory_.InvalidateWeakPtrs(); |
| icon_ = gfx::ImageSkia(); |
| - ActivityManager::Get()->UpdateActivity(this); |
| + if (activity_view_) |
| + activity_view_->UpdateIcon(); |
| } |
| void WebActivity::DidUpdateFaviconURL( |
| @@ -629,12 +636,14 @@ void WebActivity::OnDidDownloadFavicon( |
| const std::vector<gfx::Size>& original_bitmap_sizes) { |
| icon_ = CreateFaviconImageSkia( |
| bitmaps, original_bitmap_sizes, kIconSize, nullptr); |
| - ActivityManager::Get()->UpdateActivity(this); |
| + if (activity_view_) |
| + activity_view_->UpdateIcon(); |
| } |
| void WebActivity::DidChangeThemeColor(SkColor theme_color) { |
| title_color_ = theme_color; |
| - ActivityManager::Get()->UpdateActivity(this); |
| + if (activity_view_) |
| + activity_view_->UpdateRepresentativeColor(); |
| } |
| void WebActivity::HideContentProxy() { |