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

Unified Diff: athena/activity/activity_frame_view.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
« no previous file with comments | « athena/activity/activity_frame_view.h ('k') | athena/activity/activity_manager_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/activity/activity_frame_view.cc
diff --git a/athena/activity/activity_frame_view.cc b/athena/activity/activity_frame_view.cc
index fa0c36c0e422a2bd5c0d364cef26f4835558a86f..6be5d6f9284344dbede41bf45c146b6b64294377 100644
--- a/athena/activity/activity_frame_view.cc
+++ b/athena/activity/activity_frame_view.cc
@@ -59,11 +59,17 @@ ActivityFrameView::ActivityFrameView(views::Widget* frame,
UpdateWindowTitle();
UpdateWindowIcon();
+ view_model_->SetActivityView(this);
+
WindowManager::Get()->AddObserver(this);
}
ActivityFrameView::~ActivityFrameView() {
WindowManager::Get()->RemoveObserver(this);
+
+ // |view_model_| is already destroyed at this time. So do not attempt to reset
+ // the activity-view by calling SetActivityView(nullptr);
+ // http://crbug.com/427113
}
gfx::Rect ActivityFrameView::GetBoundsForClientView() const {
@@ -169,6 +175,18 @@ void ActivityFrameView::OnPaintBackground(gfx::Canvas* canvas) {
canvas->DrawRect(border_bounds, SkColorSetA(SK_ColorGRAY, 0x7f));
}
+void ActivityFrameView::UpdateTitle() {
+ UpdateWindowTitle();
+}
+
+void ActivityFrameView::UpdateIcon() {
+ UpdateWindowIcon();
+}
+
+void ActivityFrameView::UpdateRepresentativeColor() {
+ UpdateWindowTitle();
+}
+
void ActivityFrameView::OnOverviewModeEnter() {
view_model_->PrepareContentsForOverview();
in_overview_ = true;
« no previous file with comments | « athena/activity/activity_frame_view.h ('k') | athena/activity/activity_manager_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698