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

Unified Diff: chrome/browser/ui/cocoa/external_protocol_dialog_cocoa.mm

Issue 2632653002: MacViews: Enable views based External Protocol dialog behind secondary-ui-md flag. (Closed)
Patch Set: Fix chromeos Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/external_protocol_dialog_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/external_protocol_dialog.mm b/chrome/browser/ui/cocoa/external_protocol_dialog_cocoa.mm
similarity index 91%
rename from chrome/browser/ui/cocoa/external_protocol_dialog.mm
rename to chrome/browser/ui/cocoa/external_protocol_dialog_cocoa.mm
index 73781e0fd61e046eb0e25fbd60b2d7498d690f44..9f6d37f1a564f502d0ae2f87b9ca00f21da1f56f 100644
--- a/chrome/browser/ui/cocoa/external_protocol_dialog.mm
+++ b/chrome/browser/ui/cocoa/external_protocol_dialog_cocoa.mm
@@ -9,10 +9,12 @@
#include "chrome/browser/external_protocol/external_protocol_handler.h"
#include "chrome/browser/shell_integration.h"
#include "chrome/browser/tab_contents/tab_util.h"
+#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/grit/chromium_strings.h"
#include "chrome/grit/generated_resources.h"
#include "components/strings/grit/components_strings.h"
#include "ui/base/l10n/l10n_util_mac.h"
+#include "ui/base/material_design/material_design_controller.h"
#include "ui/gfx/text_elider.h"
///////////////////////////////////////////////////////////////////////////////
@@ -22,6 +24,12 @@
void ExternalProtocolHandler::RunExternalProtocolDialog(
tapted 2017/01/17 21:17:13 I think we can move this definition to a new file
karandeepb 2017/01/24 03:23:32 Done.
const GURL& url, int render_process_host_id, int routing_id,
ui::PageTransition page_transition, bool has_user_gesture) {
+ if (ui::MaterialDesignController::IsSecondaryUiMaterial()) {
+ chrome::RunExternalProtocolDialogViews(url, render_process_host_id,
+ routing_id, page_transition,
+ has_user_gesture);
+ return;
+ }
[[ExternalProtocolDialogController alloc] initWithGURL:&url
renderProcessHostId:render_process_host_id
routingId:routing_id];

Powered by Google App Engine
This is Rietveld 408576698