Index: content/browser/intents/intents_host_impl.h |
diff --git a/content/browser/intents/intents_host_impl.h b/content/browser/intents/intents_host_impl.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..724367ba4a2b4ee30dccd889ba5a90a4d6299520 |
--- /dev/null |
+++ b/content/browser/intents/intents_host_impl.h |
@@ -0,0 +1,51 @@ |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CONTENT_BROWSER_INTENTS_INTENTS_HOST_IMPL_H_ |
+#define CONTENT_BROWSER_INTENTS_INTENTS_HOST_IMPL_H_ |
+ |
+#include "base/callback.h" |
+#include "content/browser/tab_contents/tab_contents_observer.h" |
+#include "content/public/browser/intents_host.h" |
+#include "webkit/glue/web_intent_data.h" |
+ |
+class IntentInjector; |
+ |
+class IntentsHostImpl : public content::IntentsHost, |
James Hawkins
2011/11/29 02:57:55
Document the class.
Greg Billock
2011/11/29 19:18:16
Done.
|
+ public TabContentsObserver { |
+ public: |
+ IntentsHostImpl(TabContents* source_tab, |
James Hawkins
2011/11/29 02:57:55
Document the params.
Greg Billock
2011/11/29 19:18:16
Done.
|
+ const webkit_glue::WebIntentData& intent, |
+ int intent_id); |
+ virtual ~IntentsHostImpl(); |
+ |
+ // Implement IntentsHost |
James Hawkins
2011/11/29 02:57:55
// IntentsHost implementation.
Greg Billock
2011/11/29 19:18:16
Done.
|
+ virtual const webkit_glue::WebIntentData& GetIntent() OVERRIDE; |
+ virtual void DispatchIntent(TabContents* tab_contents) OVERRIDE; |
+ virtual void SendReplyMessage(webkit_glue::WebIntentReplyType reply_type, |
+ const string16& data) OVERRIDE; |
+ virtual void RegisterReplyNotification(const base::Closure& closure) OVERRIDE; |
James Hawkins
2011/11/29 02:57:55
#include "base/compiler_specific.h"
Greg Billock
2011/11/29 19:18:16
Done.
|
+ |
+ // Implement TabContentsObserver |
+ virtual void TabContentsDestroyed(TabContents* tab) OVERRIDE; |
+ |
+ private: |
+ // The intent data. |
James Hawkins
2011/11/29 02:57:55
Redundant comment; either spruce up or remove.
Greg Billock
2011/11/29 19:18:16
Done.
|
+ webkit_glue::WebIntentData intent_; |
+ |
+ // The intent ID. |
James Hawkins
2011/11/29 02:57:55
Same as above.
Greg Billock
2011/11/29 19:18:16
Done.
|
+ int intent_id_; |
+ |
+ // Weak pointer to the internal object which provides the intent to the |
+ // newly-created service tab contents. This object is self-deleting |
+ // (connected to the service TabContents). |
+ IntentInjector* intent_injector_; |
+ |
+ // A callback to be notified when SendReplyMessage is called. |
+ base::Closure reply_notifier_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(IntentsHostImpl); |
+}; |
+ |
+#endif // CONTENT_BROWSER_INTENTS_INTENTS_HOST_IMPL_H_ |