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

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

Issue 614283002: Remove Activity dependency from content_proxy (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 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 ActivityManager::Get()->UpdateActivity(this); 628 ActivityManager::Get()->UpdateActivity(this);
629 } 629 }
630 630
631 void WebActivity::HideContentProxy() { 631 void WebActivity::HideContentProxy() {
632 if (content_proxy_.get()) 632 if (content_proxy_.get())
633 content_proxy_.reset(NULL); 633 content_proxy_.reset(NULL);
634 } 634 }
635 635
636 void WebActivity::ShowContentProxy() { 636 void WebActivity::ShowContentProxy() {
637 if (!content_proxy_.get() && web_view_) 637 if (!content_proxy_.get() && web_view_)
638 content_proxy_.reset(new ContentProxy(web_view_, this)); 638 content_proxy_.reset(new ContentProxy(web_view_));
639 } 639 }
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