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

Side by Side Diff: chrome/browser/ui/intents/web_intent_picker_controller.cc

Issue 11647017: Rename platform-independent ConstrainedWindow types to WebContentsModalDialog types (part 1) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: stage changes to preserve history Created 8 years 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 | « chrome/browser/ui/gtk/web_intent_picker_gtk.cc ('k') | chrome/browser/ui/login/login_prompt.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/intents/web_intent_picker_controller.h" 5 #include "chrome/browser/ui/intents/web_intent_picker_controller.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 &WebIntentPickerController:: 234 &WebIntentPickerController::
235 OnWebIntentServicesAvailableForExplicitIntent, 235 OnWebIntentServicesAvailableForExplicitIntent,
236 weak_ptr_factory_.GetWeakPtr())); 236 weak_ptr_factory_.GetWeakPtr()));
237 return; 237 return;
238 } 238 }
239 239
240 // As soon as the dialog is requested, block all input events 240 // As soon as the dialog is requested, block all input events
241 // on the original tab. 241 // on the original tab.
242 ConstrainedWindowTabHelper* constrained_window_tab_helper = 242 ConstrainedWindowTabHelper* constrained_window_tab_helper =
243 ConstrainedWindowTabHelper::FromWebContents(web_contents_); 243 ConstrainedWindowTabHelper::FromWebContents(web_contents_);
244 constrained_window_tab_helper->BlockTabContent(true); 244 constrained_window_tab_helper->BlockWebContentsInteraction(true);
245 SetDialogState(kPickerSetup); 245 SetDialogState(kPickerSetup);
246 246
247 pending_async_count_++; 247 pending_async_count_++;
248 pending_registry_calls_count_++; 248 pending_registry_calls_count_++;
249 GetWebIntentsRegistry(profile_)->GetIntentServices( 249 GetWebIntentsRegistry(profile_)->GetIntentServices(
250 picker_model_->action(), picker_model_->type(), 250 picker_model_->action(), picker_model_->type(),
251 base::Bind(&WebIntentPickerController::OnWebIntentServicesAvailable, 251 base::Bind(&WebIntentPickerController::OnWebIntentServicesAvailable,
252 weak_ptr_factory_.GetWeakPtr())); 252 weak_ptr_factory_.GetWeakPtr()));
253 253
254 GURL invoking_url = web_contents_->GetURL(); 254 GURL invoking_url = web_contents_->GetURL();
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 icon_loader_.reset(); 698 icon_loader_.reset();
699 picker_model_.reset(new WebIntentPickerModel()); 699 picker_model_.reset(new WebIntentPickerModel());
700 icon_loader_.reset( 700 icon_loader_.reset(
701 new web_intents::IconLoader(profile_, picker_model_.get())); 701 new web_intents::IconLoader(profile_, picker_model_.get()));
702 702
703 picker_shown_ = false; 703 picker_shown_ = false;
704 704
705 DCHECK(web_contents_); 705 DCHECK(web_contents_);
706 ConstrainedWindowTabHelper* constrained_window_tab_helper = 706 ConstrainedWindowTabHelper* constrained_window_tab_helper =
707 ConstrainedWindowTabHelper::FromWebContents(web_contents_); 707 ConstrainedWindowTabHelper::FromWebContents(web_contents_);
708 constrained_window_tab_helper->BlockTabContent(false); 708 constrained_window_tab_helper->BlockWebContentsInteraction(false);
709 } 709 }
710 710
711 void WebIntentPickerController::OnShowExtensionInstallDialog( 711 void WebIntentPickerController::OnShowExtensionInstallDialog(
712 content::WebContents* parent_web_contents, 712 content::WebContents* parent_web_contents,
713 ExtensionInstallPrompt::Delegate* delegate, 713 ExtensionInstallPrompt::Delegate* delegate,
714 const ExtensionInstallPrompt::Prompt& prompt) { 714 const ExtensionInstallPrompt::Prompt& prompt) {
715 picker_model_->SetPendingExtensionInstallDelegate(delegate); 715 picker_model_->SetPendingExtensionInstallDelegate(delegate);
716 picker_model_->SetPendingExtensionInstallPrompt(prompt); 716 picker_model_->SetPendingExtensionInstallPrompt(prompt);
717 if (picker_) { 717 if (picker_) {
718 picker_->OnShowExtensionInstallDialog( 718 picker_->OnShowExtensionInstallDialog(
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
964 content::DownloadManager* download_manager = 964 content::DownloadManager* download_manager =
965 content::BrowserContext::GetDownloadManager(profile); 965 content::BrowserContext::GetDownloadManager(profile);
966 if (!download_manager) 966 if (!download_manager)
967 return; 967 return;
968 content::DownloadItem* item = 968 content::DownloadItem* item =
969 download_manager->GetDownload(download_id_.local()); 969 download_manager->GetDownload(download_id_.local());
970 if (item) 970 if (item)
971 item->Cancel(true); 971 item->Cancel(true);
972 download_id_ = content::DownloadId(); 972 download_id_ = content::DownloadId();
973 } 973 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/web_intent_picker_gtk.cc ('k') | chrome/browser/ui/login/login_prompt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698