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

Unified Diff: chrome/browser/ui/ash/web_dialog_util.cc

Issue 2446573003: chromeos: Make "mobile network" and "set time" dialogs work with mash (Closed)
Patch Set: gn check Created 4 years, 2 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
« no previous file with comments | « chrome/browser/ui/ash/web_dialog_util.h ('k') | chrome/browser/ui/browser_dialogs.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/web_dialog_util.cc
diff --git a/chrome/browser/ui/ash/web_dialog_util.cc b/chrome/browser/ui/ash/web_dialog_util.cc
deleted file mode 100644
index b1fe668841fbfcf3ce927b822b27d62d8856e141..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/ash/web_dialog_util.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/ui/ash/web_dialog_util.h"
-
-#include "ash/public/cpp/shell_window_ids.h"
-#include "ash/shell.h"
-#include "chrome/browser/extensions/chrome_extension_web_contents_observer.h"
-#include "chrome/browser/ui/ash/ash_util.h"
-#include "chrome/browser/ui/webui/chrome_web_contents_handler.h"
-#include "services/ui/public/cpp/property_type_converters.h"
-#include "services/ui/public/interfaces/window_manager.mojom.h"
-#include "ui/aura/mus/mus_util.h"
-#include "ui/views/controls/webview/web_dialog_view.h"
-#include "ui/views/widget/widget.h"
-
-namespace chrome {
-
-void ShowWebDialogWithContainer(gfx::NativeView parent,
- int container_id,
- content::BrowserContext* context,
- ui::WebDialogDelegate* delegate) {
- DCHECK(parent || container_id != ash::kShellWindowId_Invalid);
- views::WebDialogView* view =
- new views::WebDialogView(context, delegate, new ChromeWebContentsHandler);
-
- views::Widget* widget = new views::Widget;
- views::Widget::InitParams params;
- params.delegate = view;
- if (chrome::IsRunningInMash()) {
- if (parent) {
- ui::Window* parent_mus = aura::GetMusWindow(parent);
- DCHECK(parent_mus);
- params.parent_mus = parent_mus;
- } else {
- using ui::mojom::WindowManager;
- params.mus_properties[WindowManager::kInitialContainerId_Property] =
- mojo::ConvertTo<std::vector<uint8_t>>(container_id);
- }
- } else {
- if (parent) {
- params.parent = parent;
- } else {
- params.parent = ash::Shell::GetContainer(
- ash::Shell::GetPrimaryRootWindow(), container_id);
- }
- }
- widget->Init(params);
-
- // Observer is needed for ChromeVox extension to send messages between content
- // and background scripts.
- extensions::ChromeExtensionWebContentsObserver::CreateForWebContents(
- view->web_contents());
-
- widget->Show();
-}
-
-} // namespace chrome
« no previous file with comments | « chrome/browser/ui/ash/web_dialog_util.h ('k') | chrome/browser/ui/browser_dialogs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698