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 #ifndef CONTENT_BROWSER_INTENTS_WEB_INTENTS_DISPATCHER_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_INTENTS_WEB_INTENTS_DISPATCHER_IMPL_H_ |
6 #define CONTENT_BROWSER_INTENTS_WEB_INTENTS_DISPATCHER_IMPL_H_ | 6 #define CONTENT_BROWSER_INTENTS_WEB_INTENTS_DISPATCHER_IMPL_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 const webkit_glue::WebIntentData& intent, | 30 const webkit_glue::WebIntentData& intent, |
31 int intent_id); | 31 int intent_id); |
32 virtual ~WebIntentsDispatcherImpl(); | 32 virtual ~WebIntentsDispatcherImpl(); |
33 | 33 |
34 // WebIntentsDispatcher implementation. | 34 // WebIntentsDispatcher implementation. |
35 virtual const webkit_glue::WebIntentData& GetIntent() OVERRIDE; | 35 virtual const webkit_glue::WebIntentData& GetIntent() OVERRIDE; |
36 virtual void DispatchIntent(content::WebContents* destination_tab) OVERRIDE; | 36 virtual void DispatchIntent(content::WebContents* destination_tab) OVERRIDE; |
37 virtual void SendReplyMessage(webkit_glue::WebIntentReplyType reply_type, | 37 virtual void SendReplyMessage(webkit_glue::WebIntentReplyType reply_type, |
38 const string16& data) OVERRIDE; | 38 const string16& data) OVERRIDE; |
39 virtual void RegisterReplyNotification( | 39 virtual void RegisterReplyNotification( |
40 const base::Callback<void(webkit_glue::WebIntentReplyType)>& | 40 const content::WebIntentsDispatcher::ReplyNotification& closure) OVERRIDE; |
41 closure) OVERRIDE; | |
42 | 41 |
43 // content::WebContentsObserver implementation. | 42 // content::WebContentsObserver implementation. |
44 virtual void WebContentsDestroyed(content::WebContents* tab) OVERRIDE; | 43 virtual void WebContentsDestroyed(content::WebContents* tab) OVERRIDE; |
45 | 44 |
46 private: | 45 private: |
47 webkit_glue::WebIntentData intent_; | 46 webkit_glue::WebIntentData intent_; |
48 | 47 |
49 int intent_id_; | 48 int intent_id_; |
50 | 49 |
51 // Weak pointer to the internal object which provides the intent to the | 50 // Weak pointer to the internal object which provides the intent to the |
52 // newly-created service tab contents. This object is self-deleting | 51 // newly-created service tab contents. This object is self-deleting |
53 // (connected to the service TabContents). | 52 // (connected to the service TabContents). |
54 IntentInjector* intent_injector_; | 53 IntentInjector* intent_injector_; |
55 | 54 |
56 // Callbacks to be notified when SendReplyMessage is called. | 55 // Callbacks to be notified when SendReplyMessage is called. |
57 std::vector<base::Callback<void(webkit_glue::WebIntentReplyType)> > | 56 std::vector<content::WebIntentsDispatcher::ReplyNotification> |
58 reply_notifiers_; | 57 reply_notifiers_; |
59 | 58 |
60 DISALLOW_COPY_AND_ASSIGN(WebIntentsDispatcherImpl); | 59 DISALLOW_COPY_AND_ASSIGN(WebIntentsDispatcherImpl); |
61 }; | 60 }; |
62 | 61 |
63 #endif // CONTENT_BROWSER_INTENTS_WEB_INTENTS_DISPATCHER_IMPL_H_ | 62 #endif // CONTENT_BROWSER_INTENTS_WEB_INTENTS_DISPATCHER_IMPL_H_ |
OLD | NEW |