Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Side by Side Diff: athena/content/web_activity.cc

Issue 611773002: Fixing issues with new activity image readback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « athena/content/content_proxy.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « athena/content/content_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698