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

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

Issue 596623005: Do not show the activity widget in ActivityManager::AddActivity (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: rebase 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/athena.gyp ('k') | athena/extensions/athena_app_delegate_base.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/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
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
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
OLDNEW
« no previous file with comments | « athena/athena.gyp ('k') | athena/extensions/athena_app_delegate_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698