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 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 } | 451 } |
452 | 452 |
453 void WebActivity::CreateOverviewModeImage() { | 453 void WebActivity::CreateOverviewModeImage() { |
454 // TODO(skuhne): Create an overview. | 454 // TODO(skuhne): Create an overview. |
455 } | 455 } |
456 | 456 |
457 gfx::ImageSkia WebActivity::GetOverviewModeImage() { | 457 gfx::ImageSkia WebActivity::GetOverviewModeImage() { |
458 return overview_mode_image_; | 458 return overview_mode_image_; |
459 } | 459 } |
460 | 460 |
| 461 void WebActivity::PrepareContentsForOverview() { |
| 462 // Turn on fast resizing to avoid re-laying out the web contents when |
| 463 // entering / exiting overview mode. |
| 464 web_view_->SetFastResize(true); |
| 465 } |
| 466 |
| 467 void WebActivity::ResetContentsView() { |
| 468 web_view_->SetFastResize(false); |
| 469 web_view_->Layout(); |
| 470 } |
| 471 |
461 void WebActivity::TitleWasSet(content::NavigationEntry* entry, | 472 void WebActivity::TitleWasSet(content::NavigationEntry* entry, |
462 bool explicit_set) { | 473 bool explicit_set) { |
463 ActivityManager::Get()->UpdateActivity(this); | 474 ActivityManager::Get()->UpdateActivity(this); |
464 } | 475 } |
465 | 476 |
466 void WebActivity::DidUpdateFaviconURL( | 477 void WebActivity::DidUpdateFaviconURL( |
467 const std::vector<content::FaviconURL>& candidates) { | 478 const std::vector<content::FaviconURL>& candidates) { |
468 ActivityManager::Get()->UpdateActivity(this); | 479 ActivityManager::Get()->UpdateActivity(this); |
469 } | 480 } |
470 | 481 |
471 void WebActivity::DidChangeThemeColor(SkColor theme_color) { | 482 void WebActivity::DidChangeThemeColor(SkColor theme_color) { |
472 title_color_ = theme_color; | 483 title_color_ = theme_color; |
473 } | 484 } |
474 | 485 |
475 } // namespace athena | 486 } // namespace athena |
OLD | NEW |