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

Side by Side Diff: chrome/browser/ui/gtk/web_intent_picker_gtk.cc

Issue 10868072: Make TabContents ctor private; poke hole for existing callers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: all green Created 8 years, 3 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/gtk/web_intent_picker_gtk.h" 5 #include "chrome/browser/ui/gtk/web_intent_picker_gtk.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 const string16& extension_id) { 280 const string16& extension_id) {
281 UpdateSuggestedExtensions(); 281 UpdateSuggestedExtensions();
282 } 282 }
283 283
284 void WebIntentPickerGtk::OnInlineDisposition(const string16& title, 284 void WebIntentPickerGtk::OnInlineDisposition(const string16& title,
285 const GURL& url) { 285 const GURL& url) {
286 content::WebContents* web_contents = content::WebContents::Create( 286 content::WebContents* web_contents = content::WebContents::Create(
287 tab_contents_->profile(), 287 tab_contents_->profile(),
288 tab_util::GetSiteInstanceForNewTab(tab_contents_->profile(), url), 288 tab_util::GetSiteInstanceForNewTab(tab_contents_->profile(), url),
289 MSG_ROUTING_NONE, NULL); 289 MSG_ROUTING_NONE, NULL);
290 inline_disposition_tab_contents_.reset(new TabContents(web_contents)); 290 inline_disposition_tab_contents_.reset(
291 TabContents::Factory::CreateTabContents(web_contents));
291 Browser* browser = browser::FindBrowserWithWebContents( 292 Browser* browser = browser::FindBrowserWithWebContents(
292 tab_contents_->web_contents()); 293 tab_contents_->web_contents());
293 inline_disposition_delegate_.reset( 294 inline_disposition_delegate_.reset(
294 new WebIntentInlineDispositionDelegate(this, web_contents, browser)); 295 new WebIntentInlineDispositionDelegate(this, web_contents, browser));
295 296
296 // Must call this immediately after WebContents creation to avoid race 297 // Must call this immediately after WebContents creation to avoid race
297 // with load. 298 // with load.
298 delegate_->OnInlineDispositionWebContentsCreated(web_contents); 299 delegate_->OnInlineDispositionWebContentsCreated(web_contents);
299 300
300 tab_contents_container_.reset(new TabContentsContainerGtk(NULL)); 301 tab_contents_container_.reset(new TabContentsContainerGtk(NULL));
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 return alignment; 800 return alignment;
800 } 801 }
801 802
802 void WebIntentPickerGtk::RemoveThrobber() { 803 void WebIntentPickerGtk::RemoveThrobber() {
803 GtkWidget* alignment = gtk_widget_get_parent(throbber_->widget()); 804 GtkWidget* alignment = gtk_widget_get_parent(throbber_->widget());
804 DCHECK(alignment); 805 DCHECK(alignment);
805 gtk_container_remove(GTK_CONTAINER(alignment), throbber_->widget()); 806 gtk_container_remove(GTK_CONTAINER(alignment), throbber_->widget());
806 gtk_widget_destroy(alignment); 807 gtk_widget_destroy(alignment);
807 throbber_->Stop(); 808 throbber_->Stop();
808 } 809 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/web_dialog_gtk.cc ('k') | chrome/browser/ui/intents/web_intent_inline_disposition_delegate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698