| 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/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 } | 397 } |
| 398 | 398 |
| 399 void WebActivity::CreateOverviewModeImage() { | 399 void WebActivity::CreateOverviewModeImage() { |
| 400 // TODO(skuhne): Create an overview. | 400 // TODO(skuhne): Create an overview. |
| 401 } | 401 } |
| 402 | 402 |
| 403 gfx::ImageSkia WebActivity::GetOverviewModeImage() { | 403 gfx::ImageSkia WebActivity::GetOverviewModeImage() { |
| 404 return overview_mode_image_; | 404 return overview_mode_image_; |
| 405 } | 405 } |
| 406 | 406 |
| 407 void WebActivity::PrepareContentsForOverview() { |
| 408 // Turn on fast resizing to avoid re-laying out the web contents when |
| 409 // entering / exiting overview mode. |
| 410 web_view_->SetFastResize(true); |
| 411 } |
| 412 |
| 413 void WebActivity::ResetContentsView() { |
| 414 web_view_->SetFastResize(false); |
| 415 web_view_->Layout(); |
| 416 } |
| 417 |
| 407 void WebActivity::TitleWasSet(content::NavigationEntry* entry, | 418 void WebActivity::TitleWasSet(content::NavigationEntry* entry, |
| 408 bool explicit_set) { | 419 bool explicit_set) { |
| 409 ActivityManager::Get()->UpdateActivity(this); | 420 ActivityManager::Get()->UpdateActivity(this); |
| 410 } | 421 } |
| 411 | 422 |
| 412 void WebActivity::DidUpdateFaviconURL( | 423 void WebActivity::DidUpdateFaviconURL( |
| 413 const std::vector<content::FaviconURL>& candidates) { | 424 const std::vector<content::FaviconURL>& candidates) { |
| 414 ActivityManager::Get()->UpdateActivity(this); | 425 ActivityManager::Get()->UpdateActivity(this); |
| 415 } | 426 } |
| 416 | 427 |
| 417 void WebActivity::DidChangeThemeColor(SkColor theme_color) { | 428 void WebActivity::DidChangeThemeColor(SkColor theme_color) { |
| 418 title_color_ = theme_color; | 429 title_color_ = theme_color; |
| 419 } | 430 } |
| 420 | 431 |
| 421 } // namespace athena | 432 } // namespace athena |
| OLD | NEW |