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 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |