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

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

Issue 866263008: MacViews: Unify web contents modal dialog types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ValidationMessageBubble
Patch Set: Fix for rsesek Created 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/web_contents_modal_dialog_manager_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/web_contents_modal_dialog_manager_cocoa.mm b/chrome/browser/ui/cocoa/web_contents_modal_dialog_manager_cocoa.mm
deleted file mode 100644
index 5d025f6c8f6e5d865c7591cc6d5070712107f76d..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/cocoa/web_contents_modal_dialog_manager_cocoa.mm
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) 2013 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 "components/web_modal/web_contents_modal_dialog_manager.h"
-
-#include "chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h"
-#include "components/web_modal/single_web_contents_dialog_manager.h"
-
-using web_modal::NativeWebContentsModalDialog;
-
-namespace {
-
-class NativeWebContentsModalDialogManagerCocoa
- : public web_modal::SingleWebContentsDialogManager {
- public:
- NativeWebContentsModalDialogManagerCocoa(
- NativeWebContentsModalDialog dialog)
- : dialog_(dialog) {
- }
-
- ~NativeWebContentsModalDialogManagerCocoa() override {}
-
- // SingleWebContentsDialogManager overrides
- void Show() override {
- GetConstrainedWindowMac(dialog())->ShowWebContentsModalDialog();
- }
-
- void Hide() override {}
-
- void Close() override {
- GetConstrainedWindowMac(dialog())->CloseWebContentsModalDialog();
- }
-
- void Focus() override {
- GetConstrainedWindowMac(dialog())->FocusWebContentsModalDialog();
- }
-
- void Pulse() override {
- GetConstrainedWindowMac(dialog())->PulseWebContentsModalDialog();
- }
-
- void HostChanged(web_modal::WebContentsModalDialogHost* new_host) override {}
-
- NativeWebContentsModalDialog dialog() override { return dialog_; }
-
- private:
- static ConstrainedWindowMac* GetConstrainedWindowMac(
- NativeWebContentsModalDialog dialog) {
- return static_cast<ConstrainedWindowMac*>(dialog);
- }
-
- // In mac this is a pointer to a ConstrainedWindowMac.
- // TODO(gbillock): Replace this casting system with a more typesafe call path.
- NativeWebContentsModalDialog dialog_;
-
- DISALLOW_COPY_AND_ASSIGN(NativeWebContentsModalDialogManagerCocoa);
-};
-
-} // namespace
-
-namespace web_modal {
-
-SingleWebContentsDialogManager*
- WebContentsModalDialogManager::CreateNativeWebModalManager(
- NativeWebContentsModalDialog dialog,
- SingleWebContentsDialogManagerDelegate* native_delegate) {
- return new NativeWebContentsModalDialogManagerCocoa(dialog);
-}
-
-} // namespace web_modal

Powered by Google App Engine
This is Rietveld 408576698