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

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

Issue 518673007: Make activities have a thick border when in overview mode part 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@athena_overview2
Patch Set: Rebased 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
« no previous file with comments | « athena/content/web_activity.h ('k') | athena/resource_manager/resource_manager_unittest.cc » ('j') | 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/input/public/accelerator_manager.h" 9 #include "athena/input/public/accelerator_manager.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 } 458 }
459 459
460 void WebActivity::CreateOverviewModeImage() { 460 void WebActivity::CreateOverviewModeImage() {
461 // TODO(skuhne): Create an overview. 461 // TODO(skuhne): Create an overview.
462 } 462 }
463 463
464 gfx::ImageSkia WebActivity::GetOverviewModeImage() { 464 gfx::ImageSkia WebActivity::GetOverviewModeImage() {
465 return overview_mode_image_; 465 return overview_mode_image_;
466 } 466 }
467 467
468 void WebActivity::PrepareContentsForOverview() {
469 // Turn on fast resizing to avoid re-laying out the web contents when
470 // entering / exiting overview mode.
471 web_view_->SetFastResize(true);
472 }
473
474 void WebActivity::ResetContentsView() {
475 web_view_->SetFastResize(false);
476 web_view_->Layout();
477 }
478
468 void WebActivity::TitleWasSet(content::NavigationEntry* entry, 479 void WebActivity::TitleWasSet(content::NavigationEntry* entry,
469 bool explicit_set) { 480 bool explicit_set) {
470 ActivityManager::Get()->UpdateActivity(this); 481 ActivityManager::Get()->UpdateActivity(this);
471 } 482 }
472 483
473 void WebActivity::DidUpdateFaviconURL( 484 void WebActivity::DidUpdateFaviconURL(
474 const std::vector<content::FaviconURL>& candidates) { 485 const std::vector<content::FaviconURL>& candidates) {
475 ActivityManager::Get()->UpdateActivity(this); 486 ActivityManager::Get()->UpdateActivity(this);
476 } 487 }
477 488
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 526
516 void WebActivity::ReloadAndObserve() { 527 void WebActivity::ReloadAndObserve() {
517 if (web_view_->IsContentEvicted()) { 528 if (web_view_->IsContentEvicted()) {
518 DCHECK_EQ(ACTIVITY_UNLOADED, current_state_); 529 DCHECK_EQ(ACTIVITY_UNLOADED, current_state_);
519 web_view_->ReloadContent(); 530 web_view_->ReloadContent();
520 } 531 }
521 Observe(web_view_->GetWebContents()); 532 Observe(web_view_->GetWebContents());
522 } 533 }
523 534
524 } // namespace athena 535 } // namespace athena
OLDNEW
« no previous file with comments | « athena/content/web_activity.h ('k') | athena/resource_manager/resource_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698