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

Unified Diff: chrome/browser/ui/gtk/web_intent_picker_gtk.cc

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/gtk/web_intent_picker_gtk.cc
diff --git a/chrome/browser/ui/gtk/web_intent_picker_gtk.cc b/chrome/browser/ui/gtk/web_intent_picker_gtk.cc
index d46250190c327f15a518f90536ca2e6518df3b73..bf9ee3a8ea348b274210d2fa4915b43400b93d41 100644
--- a/chrome/browser/ui/gtk/web_intent_picker_gtk.cc
+++ b/chrome/browser/ui/gtk/web_intent_picker_gtk.cc
@@ -92,6 +92,8 @@ WebIntentPickerGtk::WebIntentPickerGtk(Browser* browser,
bubble_(NULL),
browser_(browser) {
DCHECK(delegate_ != NULL);
+ DCHECK(browser);
+ DCHECK(browser->window());
BrowserWindowGtk* browser_window =
BrowserWindowGtk::GetBrowserWindowForNativeWindow(
browser->window()->GetNativeHandle());
@@ -165,10 +167,8 @@ void WebIntentPickerGtk::SetDefaultServiceIcon(size_t index) {
void WebIntentPickerGtk::Close() {
bubble_->Close();
bubble_ = NULL;
-
- inline_disposition_tab_contents_.reset();
- inline_disposition_delegate_.reset();
- tab_contents_container_.reset();
+ if (inline_disposition_tab_contents_.get())
+ inline_disposition_tab_contents_->tab_contents()->OnCloseStarted();
}
void WebIntentPickerGtk::BubbleClosing(BubbleGtk* bubble,
« no previous file with comments | « chrome/browser/ui/gtk/web_intent_picker_gtk.h ('k') | chrome/browser/ui/intents/web_intent_picker_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698