Index: chrome/browser/ui/intents/web_intent_picker_controller.h |
diff --git a/chrome/browser/ui/intents/web_intent_picker_controller.h b/chrome/browser/ui/intents/web_intent_picker_controller.h |
index 3814c14917db899ce0cfde4174ea456775a9313e..976f13e161ac8c6d64dd495a004dafb8184bfec8 100644 |
--- a/chrome/browser/ui/intents/web_intent_picker_controller.h |
+++ b/chrome/browser/ui/intents/web_intent_picker_controller.h |
@@ -20,6 +20,7 @@ class Browser; |
class FaviconService; |
class GURL; |
class SkBitmap; |
+class TabContents; |
class TabContentsWrapper; |
class WebDataService; |
class WebIntentPicker; |
@@ -66,8 +67,13 @@ class WebIntentPickerController : public content::NotificationObserver, |
virtual void OnClosing() OVERRIDE; |
private: |
+ // Gets a notification when the return message is sent to the source tab, |
+ // so we can close the picker dialog or service tab. |
+ void OnSendReturnMessage(); |
+ |
friend class WebIntentPickerControllerTest; |
friend class WebIntentPickerControllerBrowserTest; |
+ friend class InvokingTabObserver; |
class WebIntentDataFetcher; |
class FaviconFetcher; |
@@ -124,6 +130,10 @@ class WebIntentPickerController : public content::NotificationObserver, |
// The intent ID assigned to this intent by the renderer. |
int intent_id_; |
+ // Weak pointer to the tab servicing the intent. Remembered in order to |
+ // close it when a reply is sent. |
+ TabContents* service_tab_; |
+ |
DISALLOW_COPY_AND_ASSIGN(WebIntentPickerController); |
}; |