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 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 SetCurrentState(ACTIVITY_INVISIBLE); | 541 SetCurrentState(ACTIVITY_INVISIBLE); |
542 } | 542 } |
543 } | 543 } |
544 return web_view_; | 544 return web_view_; |
545 } | 545 } |
546 | 546 |
547 views::Widget* WebActivity::CreateWidget() { | 547 views::Widget* WebActivity::CreateWidget() { |
548 return NULL; // Use default widget. | 548 return NULL; // Use default widget. |
549 } | 549 } |
550 | 550 |
551 gfx::ImageSkia WebActivity::GetOverviewModeImage() { | 551 gfx::Image WebActivity::GetOverviewModeImage() { |
552 if (content_proxy_.get()) | 552 if (content_proxy_.get()) |
553 content_proxy_->GetContentImage(); | 553 content_proxy_->GetContentImage(); |
554 return gfx::ImageSkia(); | 554 return gfx::Image(); |
555 } | 555 } |
556 | 556 |
557 void WebActivity::PrepareContentsForOverview() { | 557 void WebActivity::PrepareContentsForOverview() { |
558 // Turn on fast resizing to avoid re-laying out the web contents when | 558 // Turn on fast resizing to avoid re-laying out the web contents when |
559 // entering / exiting overview mode and the content is visible. | 559 // entering / exiting overview mode and the content is visible. |
560 if (!content_proxy_.get()) | 560 if (!content_proxy_.get()) |
561 web_view_->SetFastResize(true); | 561 web_view_->SetFastResize(true); |
562 } | 562 } |
563 | 563 |
564 void WebActivity::ResetContentsView() { | 564 void WebActivity::ResetContentsView() { |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 | 632 |
633 void WebActivity::ReloadAndObserve() { | 633 void WebActivity::ReloadAndObserve() { |
634 if (web_view_->IsContentEvicted()) { | 634 if (web_view_->IsContentEvicted()) { |
635 DCHECK_EQ(ACTIVITY_UNLOADED, current_state_); | 635 DCHECK_EQ(ACTIVITY_UNLOADED, current_state_); |
636 web_view_->ReloadContent(); | 636 web_view_->ReloadContent(); |
637 } | 637 } |
638 Observe(web_view_->GetWebContents()); | 638 Observe(web_view_->GetWebContents()); |
639 } | 639 } |
640 | 640 |
641 } // namespace athena | 641 } // namespace athena |
OLD | NEW |