OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "athena/content/web_activity.h" | 5 #include "athena/content/web_activity.h" |
6 | 6 |
7 #include "athena/activity/public/activity_factory.h" | 7 #include "athena/activity/public/activity_factory.h" |
8 #include "athena/activity/public/activity_manager.h" | 8 #include "athena/activity/public/activity_manager.h" |
9 #include "athena/input/public/accelerator_manager.h" | 9 #include "athena/input/public/accelerator_manager.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 ActivityManager::Get()->UpdateActivity(this); | 470 ActivityManager::Get()->UpdateActivity(this); |
471 } | 471 } |
472 | 472 |
473 void WebActivity::DidUpdateFaviconURL( | 473 void WebActivity::DidUpdateFaviconURL( |
474 const std::vector<content::FaviconURL>& candidates) { | 474 const std::vector<content::FaviconURL>& candidates) { |
475 ActivityManager::Get()->UpdateActivity(this); | 475 ActivityManager::Get()->UpdateActivity(this); |
476 } | 476 } |
477 | 477 |
478 void WebActivity::DidChangeThemeColor(SkColor theme_color) { | 478 void WebActivity::DidChangeThemeColor(SkColor theme_color) { |
479 title_color_ = theme_color; | 479 title_color_ = theme_color; |
| 480 ActivityManager::Get()->UpdateActivity(this); |
480 } | 481 } |
481 | 482 |
482 void WebActivity::MakeVisible() { | 483 void WebActivity::MakeVisible() { |
483 // TODO(skuhne): Once we know how to handle the Overview mode, this has to | 484 // TODO(skuhne): Once we know how to handle the Overview mode, this has to |
484 // be moved into an ActivityContentController which is used by all activities. | 485 // be moved into an ActivityContentController which is used by all activities. |
485 // Make the content visible. | 486 // Make the content visible. |
486 // TODO(skuhne): If this can be combined with app_activity, move this into a | 487 // TODO(skuhne): If this can be combined with app_activity, move this into a |
487 // separate class. | 488 // separate class. |
488 web_view_->SetVisible(true); | 489 web_view_->SetVisible(true); |
489 web_view_->GetWebContents()->GetNativeView()->Show(); | 490 web_view_->GetWebContents()->GetNativeView()->Show(); |
(...skipping 24 matching lines...) Expand all Loading... |
514 | 515 |
515 void WebActivity::ReloadAndObserve() { | 516 void WebActivity::ReloadAndObserve() { |
516 if (web_view_->IsContentEvicted()) { | 517 if (web_view_->IsContentEvicted()) { |
517 DCHECK_EQ(ACTIVITY_UNLOADED, current_state_); | 518 DCHECK_EQ(ACTIVITY_UNLOADED, current_state_); |
518 web_view_->ReloadContent(); | 519 web_view_->ReloadContent(); |
519 } | 520 } |
520 Observe(web_view_->GetWebContents()); | 521 Observe(web_view_->GetWebContents()); |
521 } | 522 } |
522 | 523 |
523 } // namespace athena | 524 } // namespace athena |
OLD | NEW |