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

Side by Side Diff: chrome/browser/extensions/external_install_error.cc

Issue 1661713002: Remove the rest of HostDesktopType from c/b/ui/browser_finder.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-11
Patch Set: linux adl Created 4 years, 10 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/extensions/external_install_error.h" 5 #include "chrome/browser/extensions/external_install_error.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 void ExternalInstallError::OnDialogReady( 415 void ExternalInstallError::OnDialogReady(
416 ExtensionInstallPromptShowParams* show_params, 416 ExtensionInstallPromptShowParams* show_params,
417 const ExtensionInstallPrompt::DoneCallback& callback, 417 const ExtensionInstallPrompt::DoneCallback& callback,
418 scoped_ptr<ExtensionInstallPrompt::Prompt> prompt) { 418 scoped_ptr<ExtensionInstallPrompt::Prompt> prompt) {
419 prompt_ = std::move(prompt); 419 prompt_ = std::move(prompt);
420 420
421 if (alert_type_ == BUBBLE_ALERT) { 421 if (alert_type_ == BUBBLE_ALERT) {
422 global_error_.reset(new ExternalInstallBubbleAlert(this, prompt_.get())); 422 global_error_.reset(new ExternalInstallBubbleAlert(this, prompt_.get()));
423 error_service_->AddGlobalError(global_error_.get()); 423 error_service_->AddGlobalError(global_error_.get());
424 424
425 Browser* browser = 425 Browser* browser = chrome::FindTabbedBrowser(
426 chrome::FindTabbedBrowser(Profile::FromBrowserContext(browser_context_), 426 Profile::FromBrowserContext(browser_context_), true);
427 true,
428 chrome::GetActiveDesktop());
429 if (browser) 427 if (browser)
430 global_error_->ShowBubbleView(browser); 428 global_error_->ShowBubbleView(browser);
431 } else { 429 } else {
432 DCHECK(alert_type_ == MENU_ALERT); 430 DCHECK(alert_type_ == MENU_ALERT);
433 global_error_.reset(new ExternalInstallMenuAlert(this)); 431 global_error_.reset(new ExternalInstallMenuAlert(this));
434 error_service_->AddGlobalError(global_error_.get()); 432 error_service_->AddGlobalError(global_error_.get());
435 } 433 }
436 } 434 }
437 435
438 void ExternalInstallError::RemoveError() { 436 void ExternalInstallError::RemoveError() {
439 manager_->RemoveExternalInstallError(extension_id_); 437 manager_->RemoveExternalInstallError(extension_id_);
440 } 438 }
441 439
442 } // namespace extensions 440 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_tab_util.cc ('k') | chrome/browser/extensions/theme_installed_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698