| 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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 load_url_params.is_renderer_initiated = params.is_renderer_initiated; | 228 load_url_params.is_renderer_initiated = params.is_renderer_initiated; |
| 229 load_url_params.transferred_global_request_id = | 229 load_url_params.transferred_global_request_id = |
| 230 params.transferred_global_request_id; | 230 params.transferred_global_request_id; |
| 231 web_contents()->GetController().LoadURLWithParams(load_url_params); | 231 web_contents()->GetController().LoadURLWithParams(load_url_params); |
| 232 return web_contents(); | 232 return web_contents(); |
| 233 } | 233 } |
| 234 case NEW_FOREGROUND_TAB: | 234 case NEW_FOREGROUND_TAB: |
| 235 case NEW_BACKGROUND_TAB: | 235 case NEW_BACKGROUND_TAB: |
| 236 case NEW_POPUP: | 236 case NEW_POPUP: |
| 237 case NEW_WINDOW: { | 237 case NEW_WINDOW: { |
| 238 ActivityManager::Get()->AddActivity( | 238 Activity* activity = ActivityFactory::Get()->CreateWebActivity( |
| 239 ActivityFactory::Get()->CreateWebActivity( | 239 browser_context(), base::string16(), params.url); |
| 240 browser_context(), base::string16(), params.url)); | 240 Activity::Show(activity); |
| 241 break; | 241 break; |
| 242 } | 242 } |
| 243 default: | 243 default: |
| 244 break; | 244 break; |
| 245 } | 245 } |
| 246 // NULL is returned if the URL wasn't opened immediately. | 246 // NULL is returned if the URL wasn't opened immediately. |
| 247 return NULL; | 247 return NULL; |
| 248 } | 248 } |
| 249 | 249 |
| 250 virtual bool CanOverscrollContent() const OVERRIDE { | 250 virtual bool CanOverscrollContent() const OVERRIDE { |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 | 633 |
| 634 void WebActivity::ReloadAndObserve() { | 634 void WebActivity::ReloadAndObserve() { |
| 635 if (web_view_->IsContentEvicted()) { | 635 if (web_view_->IsContentEvicted()) { |
| 636 DCHECK_EQ(ACTIVITY_UNLOADED, current_state_); | 636 DCHECK_EQ(ACTIVITY_UNLOADED, current_state_); |
| 637 web_view_->ReloadContent(); | 637 web_view_->ReloadContent(); |
| 638 } | 638 } |
| 639 Observe(web_view_->GetWebContents()); | 639 Observe(web_view_->GetWebContents()); |
| 640 } | 640 } |
| 641 | 641 |
| 642 } // namespace athena | 642 } // namespace athena |
| OLD | NEW |