Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(691)

Unified Diff: chrome/browser/ui/intents/web_intent_picker_controller.h

Issue 8508019: Add a method to the controller to close the picker/service tab when a return value is passed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
};

Powered by Google App Engine
This is Rietveld 408576698