Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(378)

Unified Diff: athena/content/app_activity.cc

Issue 694413005: athena: Introduce ActivityView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: athena/content/app_activity.cc
diff --git a/athena/content/app_activity.cc b/athena/content/app_activity.cc
index 9824ca2bdef617cc133e3062920636a031c4d1c1..5471e9c9966e6a07448f7cffdd6aa2bbc457c184 100644
--- a/athena/content/app_activity.cc
+++ b/athena/content/app_activity.cc
@@ -5,6 +5,7 @@
#include "athena/content/app_activity.h"
#include "athena/activity/public/activity_manager.h"
+#include "athena/activity/public/activity_view.h"
#include "athena/content/app_activity_registry.h"
#include "athena/content/content_proxy.h"
#include "athena/content/media_utils.h"
@@ -24,7 +25,8 @@ AppActivity::AppActivity(const std::string& app_id, views::WebView* web_view)
: app_id_(app_id),
web_view_(web_view),
current_state_(ACTIVITY_UNLOADED),
- app_activity_registry_(nullptr) {
+ app_activity_registry_(nullptr),
+ activity_view_(nullptr) {
Observe(web_view->GetWebContents());
}
@@ -166,6 +168,10 @@ gfx::ImageSkia AppActivity::GetIcon() const {
return gfx::ImageSkia();
}
+void AppActivity::SetActivityView(ActivityView* view) {
oshima 2014/11/04 22:17:04 DCHECK(!activitY_view_) ?
sadrul 2014/11/04 23:26:08 Done.
+ activity_view_ = view;
+}
+
bool AppActivity::UsesFrame() const {
return false;
}
@@ -211,12 +217,14 @@ AppActivity::~AppActivity() {
void AppActivity::TitleWasSet(content::NavigationEntry* entry,
bool explicit_set) {
- ActivityManager::Get()->UpdateActivity(this);
+ if (activity_view_)
+ activity_view_->UpdateTitle();
}
void AppActivity::DidUpdateFaviconURL(
const std::vector<content::FaviconURL>& candidates) {
- ActivityManager::Get()->UpdateActivity(this);
+ if (activity_view_)
+ activity_view_->UpdateIcon();
}
// Register an |activity| with an application.

Powered by Google App Engine
This is Rietveld 408576698