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

Side by Side Diff: chrome/browser/ui/cocoa/web_intent_picker_cocoa.mm

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
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/web_intent_picker_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/cocoa/web_intent_picker_cocoa.h" 5 #include "chrome/browser/ui/cocoa/web_intent_picker_cocoa.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 // We don't handle individual icon changes - just redo the whole model. 155 // We don't handle individual icon changes - just redo the whole model.
156 PerformLayout(); 156 PerformLayout();
157 } 157 }
158 158
159 void WebIntentPickerCocoa::OnInlineDisposition(WebIntentPickerModel* model, 159 void WebIntentPickerCocoa::OnInlineDisposition(WebIntentPickerModel* model,
160 const GURL& url) { 160 const GURL& url) {
161 DCHECK(browser_); 161 DCHECK(browser_);
162 content::WebContents* web_contents = content::WebContents::Create( 162 content::WebContents* web_contents = content::WebContents::Create(
163 browser_->profile(), NULL, MSG_ROUTING_NONE, NULL, NULL); 163 browser_->profile(), NULL, MSG_ROUTING_NONE, NULL, NULL);
164 inline_disposition_tab_contents_.reset(new TabContentsWrapper(web_contents)); 164 inline_disposition_tab_contents_.reset(new TabContentsWrapper(web_contents));
165 inline_disposition_delegate_.reset(new WebIntentInlineDispositionDelegate); 165 inline_disposition_delegate_.reset(
166 new WebIntentInlineDispositionDelegate(this));
166 web_contents->SetDelegate(inline_disposition_delegate_.get()); 167 web_contents->SetDelegate(inline_disposition_delegate_.get());
167 168
168 // Must call this immediately after WebContents creation to avoid race 169 // Must call this immediately after WebContents creation to avoid race
169 // with load. 170 // with load.
170 delegate_->OnInlineDispositionWebContentsCreated(web_contents); 171 delegate_->OnInlineDispositionWebContentsCreated(web_contents);
171 172
172 inline_disposition_tab_contents_->web_contents()->GetController().LoadURL( 173 inline_disposition_tab_contents_->web_contents()->GetController().LoadURL(
173 url, 174 url,
174 content::Referrer(), 175 content::Referrer(),
175 content::PAGE_TRANSITION_START_PAGE, 176 content::PAGE_TRANSITION_START_PAGE,
(...skipping 25 matching lines...) Expand all
201 const std::string& extension_id) { 202 const std::string& extension_id) {
202 delegate_->OnExtensionInstallRequested(extension_id); 203 delegate_->OnExtensionInstallRequested(extension_id);
203 } 204 }
204 205
205 void WebIntentPickerCocoa::OnExtensionInstallSuccess(const std::string& id) { 206 void WebIntentPickerCocoa::OnExtensionInstallSuccess(const std::string& id) {
206 } 207 }
207 208
208 void WebIntentPickerCocoa::OnExtensionInstallFailure(const std::string& id) { 209 void WebIntentPickerCocoa::OnExtensionInstallFailure(const std::string& id) {
209 // TODO(groby): What to do on failure? (See also binji for views/gtk) 210 // TODO(groby): What to do on failure? (See also binji for views/gtk)
210 } 211 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/web_intent_picker_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698