Chromium Code Reviews| 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 |
| index b1fe668841fbfcf3ce927b822b27d62d8856e141..d91ddbeedea628a831e7fb8898ba29753125db01 100644 |
| --- a/chrome/browser/ui/ash/web_dialog_util.cc |
| +++ b/chrome/browser/ui/ash/web_dialog_util.cc |
| @@ -11,17 +11,15 @@ |
| #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); |
| +void ShowWebDialogInContainer(int container_id, |
| + content::BrowserContext* context, |
| + ui::WebDialogDelegate* delegate) { |
| + DCHECK(container_id != ash::kShellWindowId_Invalid); |
| views::WebDialogView* view = |
| new views::WebDialogView(context, delegate, new ChromeWebContentsHandler); |
| @@ -29,22 +27,12 @@ void ShowWebDialogWithContainer(gfx::NativeView parent, |
| 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); |
| - } |
| + using ui::mojom::WindowManager; |
|
msw
2016/10/24 22:18:09
aside: this is a little odd; is it much worse to i
James Cook
2016/10/25 00:29:04
I kept the "using" because otherwise you end up wi
|
| + 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); |
| - } |
| + params.parent = ash::Shell::GetContainer(ash::Shell::GetPrimaryRootWindow(), |
| + container_id); |
| } |
| widget->Init(params); |