Chromium Code Reviews| 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..8a181ffc9c7642001d0b365cec79f3193697dca4 100644 |
| --- a/athena/activity/activity_frame_view.cc |
| +++ b/athena/activity/activity_frame_view.cc |
| @@ -59,11 +59,16 @@ 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); |
|
sadrul
2014/11/04 20:05:16
This seems unfortunate.
oshima
2014/11/04 22:17:04
Yep, I was once tried to fix this and failed :(
I
|
| } |
| gfx::Rect ActivityFrameView::GetBoundsForClientView() const { |
| @@ -169,6 +174,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; |