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

Side by Side Diff: content/browser/intents/web_intents_dispatcher_impl.cc

Issue 9030010: Move most of the remaining users of WebContentsObserver::tab_contents() to use web_contents(). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/browser/intents/web_intents_dispatcher_impl.h" 5 #include "content/browser/intents/web_intents_dispatcher_impl.h"
6 6
7 #include "content/browser/intents/intent_injector.h" 7 #include "content/browser/intents/intent_injector.h"
8 #include "content/browser/tab_contents/tab_contents.h" 8 #include "content/browser/tab_contents/tab_contents.h"
9 #include "content/common/intents_messages.h" 9 #include "content/common/intents_messages.h"
10 #include "webkit/glue/web_intent_data.h" 10 #include "webkit/glue/web_intent_data.h"
(...skipping 20 matching lines...) Expand all
31 DCHECK(!intent_injector_); 31 DCHECK(!intent_injector_);
32 intent_injector_ = new IntentInjector(destination_tab); 32 intent_injector_ = new IntentInjector(destination_tab);
33 intent_injector_->SetIntent(this, intent_); 33 intent_injector_->SetIntent(this, intent_);
34 } 34 }
35 35
36 void WebIntentsDispatcherImpl::SendReplyMessage( 36 void WebIntentsDispatcherImpl::SendReplyMessage(
37 webkit_glue::WebIntentReplyType reply_type, 37 webkit_glue::WebIntentReplyType reply_type,
38 const string16& data) { 38 const string16& data) {
39 intent_injector_ = NULL; 39 intent_injector_ = NULL;
40 40
41 if (!tab_contents()) 41 if (!web_contents())
42 return; 42 return;
43 43
44 Send(new IntentsMsg_WebIntentReply( 44 Send(new IntentsMsg_WebIntentReply(
45 routing_id(), reply_type, data, intent_id_)); 45 routing_id(), reply_type, data, intent_id_));
46 if (!reply_notifier_.is_null()) 46 if (!reply_notifier_.is_null())
47 reply_notifier_.Run(); 47 reply_notifier_.Run();
48 } 48 }
49 49
50 void WebIntentsDispatcherImpl::RegisterReplyNotification( 50 void WebIntentsDispatcherImpl::RegisterReplyNotification(
51 const base::Closure& closure) { 51 const base::Closure& closure) {
52 reply_notifier_ = closure; 52 reply_notifier_ = closure;
53 } 53 }
54 54
55 void WebIntentsDispatcherImpl::WebContentsDestroyed(WebContents* tab) { 55 void WebIntentsDispatcherImpl::WebContentsDestroyed(WebContents* tab) {
56 if (intent_injector_) 56 if (intent_injector_)
57 intent_injector_->SourceWebContentsDestroyed(tab); 57 intent_injector_->SourceWebContentsDestroyed(tab);
58 58
59 intent_injector_ = NULL; 59 intent_injector_ = NULL;
60 } 60 }
OLDNEW
« no previous file with comments | « content/browser/intents/intent_injector.cc ('k') | content/browser/renderer_host/render_view_host_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698