OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 | 45 |
46 for (size_t i = 0; i < reply_notifiers_.size(); ++i) { | 46 for (size_t i = 0; i < reply_notifiers_.size(); ++i) { |
47 if (!reply_notifiers_[i].is_null()) | 47 if (!reply_notifiers_[i].is_null()) |
48 reply_notifiers_[i].Run(reply_type); | 48 reply_notifiers_[i].Run(reply_type); |
49 } | 49 } |
50 | 50 |
51 delete this; | 51 delete this; |
52 } | 52 } |
53 | 53 |
54 void WebIntentsDispatcherImpl::RegisterReplyNotification( | 54 void WebIntentsDispatcherImpl::RegisterReplyNotification( |
55 const base::Callback<void(webkit_glue::WebIntentReplyType)>& closure) { | 55 const content::WebIntentsDispatcher::ReplyNotification& closure) { |
56 reply_notifiers_.push_back(closure); | 56 reply_notifiers_.push_back(closure); |
57 } | 57 } |
58 | 58 |
59 void WebIntentsDispatcherImpl::WebContentsDestroyed(WebContents* tab) { | 59 void WebIntentsDispatcherImpl::WebContentsDestroyed(WebContents* tab) { |
60 if (intent_injector_) | 60 if (intent_injector_) |
61 intent_injector_->SourceWebContentsDestroyed(tab); | 61 intent_injector_->SourceWebContentsDestroyed(tab); |
62 | 62 |
63 intent_injector_ = NULL; | 63 intent_injector_ = NULL; |
64 } | 64 } |
OLD | NEW |