| 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 17 matching lines...) Expand all Loading... |
| 28 // the correct Javascript callback. | 28 // the correct Javascript callback. |
| 29 WebIntentsDispatcherImpl(content::WebContents* source_contents, | 29 WebIntentsDispatcherImpl(content::WebContents* source_contents, |
| 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( | 36 virtual void DispatchIntent( |
| 37 content::WebContents* destination_contents) OVERRIDE; | 37 content::WebContents* destination_contents) OVERRIDE; |
| 38 virtual void CancelDispatch() OVERRIDE; |
| 38 virtual void SendReplyMessage(webkit_glue::WebIntentReplyType reply_type, | 39 virtual void SendReplyMessage(webkit_glue::WebIntentReplyType reply_type, |
| 39 const string16& data) OVERRIDE; | 40 const string16& data) OVERRIDE; |
| 40 virtual void RegisterReplyNotification( | 41 virtual void RegisterReplyNotification( |
| 41 const content::WebIntentsDispatcher::ReplyNotification& closure) OVERRIDE; | 42 const content::WebIntentsDispatcher::ReplyNotification& closure) OVERRIDE; |
| 42 | 43 |
| 43 // content::WebContentsObserver implementation. | 44 // content::WebContentsObserver implementation. |
| 44 virtual void WebContentsDestroyed(content::WebContents* contents) OVERRIDE; | 45 virtual void WebContentsDestroyed(content::WebContents* contents) OVERRIDE; |
| 45 | 46 |
| 46 private: | 47 private: |
| 47 webkit_glue::WebIntentData intent_; | 48 webkit_glue::WebIntentData intent_; |
| 48 | 49 |
| 49 int intent_id_; | 50 int intent_id_; |
| 50 | 51 |
| 51 // Weak pointer to the internal object which provides the intent to the | 52 // Weak pointer to the internal object which provides the intent to the |
| 52 // newly-created service WebContents. This object is self-deleting | 53 // newly-created service WebContents. This object is self-deleting |
| 53 // (connected to the service WebContents). | 54 // (connected to the service WebContents). |
| 54 IntentInjector* intent_injector_; | 55 IntentInjector* intent_injector_; |
| 55 | 56 |
| 56 // Callbacks to be notified when SendReplyMessage is called. | 57 // Callbacks to be notified when SendReplyMessage is called. |
| 57 std::vector<content::WebIntentsDispatcher::ReplyNotification> | 58 std::vector<content::WebIntentsDispatcher::ReplyNotification> |
| 58 reply_notifiers_; | 59 reply_notifiers_; |
| 59 | 60 |
| 60 DISALLOW_COPY_AND_ASSIGN(WebIntentsDispatcherImpl); | 61 DISALLOW_COPY_AND_ASSIGN(WebIntentsDispatcherImpl); |
| 61 }; | 62 }; |
| 62 | 63 |
| 63 #endif // CONTENT_BROWSER_INTENTS_WEB_INTENTS_DISPATCHER_IMPL_H_ | 64 #endif // CONTENT_BROWSER_INTENTS_WEB_INTENTS_DISPATCHER_IMPL_H_ |
| OLD | NEW |