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

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

Issue 9959130: [Web Intents] Display throbber when loading inline disposition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 8 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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 void WebIntentPickerGtk::OnExtensionIconChanged(WebIntentPickerModel* model, 185 void WebIntentPickerGtk::OnExtensionIconChanged(WebIntentPickerModel* model,
186 const string16& extension_id) { 186 const string16& extension_id) {
187 UpdateSuggestedExtensions(); 187 UpdateSuggestedExtensions();
188 } 188 }
189 189
190 void WebIntentPickerGtk::OnInlineDisposition(WebIntentPickerModel* model, 190 void WebIntentPickerGtk::OnInlineDisposition(WebIntentPickerModel* model,
191 const GURL& url) { 191 const GURL& url) {
192 content::WebContents* web_contents = content::WebContents::Create( 192 content::WebContents* web_contents = content::WebContents::Create(
193 browser_->profile(), NULL, MSG_ROUTING_NONE, NULL, NULL); 193 browser_->profile(), NULL, MSG_ROUTING_NONE, NULL, NULL);
194 inline_disposition_tab_contents_.reset(new TabContentsWrapper(web_contents)); 194 inline_disposition_tab_contents_.reset(new TabContentsWrapper(web_contents));
195 inline_disposition_delegate_.reset(new WebIntentInlineDispositionDelegate); 195 inline_disposition_delegate_.reset(
196 new WebIntentInlineDispositionDelegate(this));
196 web_contents->SetDelegate(inline_disposition_delegate_.get()); 197 web_contents->SetDelegate(inline_disposition_delegate_.get());
197 198
198 // Must call this immediately after WebContents creation to avoid race 199 // Must call this immediately after WebContents creation to avoid race
199 // with load. 200 // with load.
200 delegate_->OnInlineDispositionWebContentsCreated(web_contents); 201 delegate_->OnInlineDispositionWebContentsCreated(web_contents);
201 202
202 tab_contents_container_.reset(new TabContentsContainerGtk(NULL)); 203 tab_contents_container_.reset(new TabContentsContainerGtk(NULL));
203 tab_contents_container_->SetTab(inline_disposition_tab_contents_.get()); 204 tab_contents_container_->SetTab(inline_disposition_tab_contents_.get());
204 205
205 inline_disposition_tab_contents_->web_contents()->GetController().LoadURL( 206 inline_disposition_tab_contents_->web_contents()->GetController().LoadURL(
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 WebIntentPicker::GetNthStarImageIdFromCWSRating(rating, i), 565 WebIntentPicker::GetNthStarImageIdFromCWSRating(rating, i),
565 ui::ResourceBundle::RTL_ENABLED); 566 ui::ResourceBundle::RTL_ENABLED);
566 gtk_box_pack_start( 567 gtk_box_pack_start(
567 GTK_BOX(hbox), 568 GTK_BOX(hbox),
568 gtk_image_new_from_pixbuf(image.ToGdkPixbuf()), 569 gtk_image_new_from_pixbuf(image.ToGdkPixbuf()),
569 FALSE, FALSE, 0); 570 FALSE, FALSE, 0);
570 } 571 }
571 572
572 return hbox; 573 return hbox;
573 } 574 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/web_intent_picker_cocoa.mm ('k') | chrome/browser/ui/intents/web_intent_inline_disposition_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698