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

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

Issue 591693002: Creating PNG images from web content to be used by OverviewMode navigation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
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 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 SetCurrentState(ACTIVITY_INVISIBLE); 487 SetCurrentState(ACTIVITY_INVISIBLE);
488 } 488 }
489 } 489 }
490 return web_view_; 490 return web_view_;
491 } 491 }
492 492
493 views::Widget* WebActivity::CreateWidget() { 493 views::Widget* WebActivity::CreateWidget() {
494 return NULL; // Use default widget. 494 return NULL; // Use default widget.
495 } 495 }
496 496
497 gfx::ImageSkia WebActivity::GetOverviewModeImage() { 497 scoped_ptr<gfx::Image> WebActivity::GetOverviewModeImage() {
498 if (content_proxy_.get()) 498 if (content_proxy_.get())
499 content_proxy_->GetContentImage(); 499 content_proxy_->GetContentImage();
500 return gfx::ImageSkia(); 500 return scoped_ptr<gfx::Image>(new gfx::Image());
501 } 501 }
502 502
503 void WebActivity::PrepareContentsForOverview() { 503 void WebActivity::PrepareContentsForOverview() {
504 // Turn on fast resizing to avoid re-laying out the web contents when 504 // Turn on fast resizing to avoid re-laying out the web contents when
505 // entering / exiting overview mode and the content is visible. 505 // entering / exiting overview mode and the content is visible.
506 if (!content_proxy_.get()) 506 if (!content_proxy_.get())
507 web_view_->SetFastResize(true); 507 web_view_->SetFastResize(true);
508 } 508 }
509 509
510 void WebActivity::ResetContentsView() { 510 void WebActivity::ResetContentsView() {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 578
579 void WebActivity::ReloadAndObserve() { 579 void WebActivity::ReloadAndObserve() {
580 if (web_view_->IsContentEvicted()) { 580 if (web_view_->IsContentEvicted()) {
581 DCHECK_EQ(ACTIVITY_UNLOADED, current_state_); 581 DCHECK_EQ(ACTIVITY_UNLOADED, current_state_);
582 web_view_->ReloadContent(); 582 web_view_->ReloadContent();
583 } 583 }
584 Observe(web_view_->GetWebContents()); 584 Observe(web_view_->GetWebContents());
585 } 585 }
586 586
587 } // namespace athena 587 } // namespace athena
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698