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

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: Change delegate comment to notification sense of OnClosing. 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 ab835c35845e9ed26492c320770a85dc1cb073cd..64db33336317d3102ccc961188e7d3ffebbc5fac 100644
--- a/chrome/browser/ui/intents/web_intent_picker_controller.h
+++ b/chrome/browser/ui/intents/web_intent_picker_controller.h
@@ -19,6 +19,7 @@
class Browser;
class GURL;
class SkBitmap;
+class TabContents;
class TabContentsWrapper;
class WebIntentPicker;
class WebIntentPickerFactory;
@@ -64,8 +65,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;
@@ -122,6 +128,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);
};
« no previous file with comments | « chrome/browser/ui/gtk/web_intent_picker_gtk.cc ('k') | chrome/browser/ui/intents/web_intent_picker_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698