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/content/content_proxy.h" | 9 #include "athena/content/content_proxy.h" |
10 #include "athena/content/public/dialogs.h" | 10 #include "athena/content/public/dialogs.h" |
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 } | 551 } |
552 return web_view_; | 552 return web_view_; |
553 } | 553 } |
554 | 554 |
555 views::Widget* WebActivity::CreateWidget() { | 555 views::Widget* WebActivity::CreateWidget() { |
556 return NULL; // Use default widget. | 556 return NULL; // Use default widget. |
557 } | 557 } |
558 | 558 |
559 gfx::ImageSkia WebActivity::GetOverviewModeImage() { | 559 gfx::ImageSkia WebActivity::GetOverviewModeImage() { |
560 if (content_proxy_.get()) | 560 if (content_proxy_.get()) |
561 content_proxy_->GetContentImage(); | 561 return content_proxy_->GetContentImage(); |
562 return gfx::ImageSkia(); | 562 return gfx::ImageSkia(); |
563 } | 563 } |
564 | 564 |
565 void WebActivity::PrepareContentsForOverview() { | 565 void WebActivity::PrepareContentsForOverview() { |
566 // Turn on fast resizing to avoid re-laying out the web contents when | 566 // Turn on fast resizing to avoid re-laying out the web contents when |
567 // entering / exiting overview mode and the content is visible. | 567 // entering / exiting overview mode and the content is visible. |
568 if (!content_proxy_.get()) | 568 if (!content_proxy_.get()) |
569 web_view_->SetFastResize(true); | 569 web_view_->SetFastResize(true); |
570 } | 570 } |
571 | 571 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
640 | 640 |
641 void WebActivity::ReloadAndObserve() { | 641 void WebActivity::ReloadAndObserve() { |
642 if (web_view_->IsContentEvicted()) { | 642 if (web_view_->IsContentEvicted()) { |
643 DCHECK_EQ(ACTIVITY_UNLOADED, current_state_); | 643 DCHECK_EQ(ACTIVITY_UNLOADED, current_state_); |
644 web_view_->ReloadContent(); | 644 web_view_->ReloadContent(); |
645 } | 645 } |
646 Observe(web_view_->GetWebContents()); | 646 Observe(web_view_->GetWebContents()); |
647 } | 647 } |
648 | 648 |
649 } // namespace athena | 649 } // namespace athena |
OLD | NEW |