Revert of Add button to add new FSP services to Files app. (patchset #8 id:140001...
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / single_web_contents_dialog_manager_cocoa.h
blob2f90e7bc92ea0eb02211f13ef438b960daf2b1d1
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_COCOA_SINGLE_WEB_CONTENTS_DIALOG_MANAGER_COCOA_H_
6 #define CHROME_BROWSER_UI_COCOA_SINGLE_WEB_CONTENTS_DIALOG_MANAGER_COCOA_H_
8 #import "base/mac/scoped_nsobject.h"
9 #include "components/web_modal/single_web_contents_dialog_manager.h"
11 class ConstrainedWindowMac;
12 @protocol ConstrainedWindowSheet;
14 // Cocoa implementation of web_modal::SingleWebContentsDialogManager.
15 class SingleWebContentsDialogManagerCocoa
16 : public web_modal::SingleWebContentsDialogManager {
17 public:
18 SingleWebContentsDialogManagerCocoa(
19 ConstrainedWindowMac* client,
20 id<ConstrainedWindowSheet> sheet,
21 web_modal::SingleWebContentsDialogManagerDelegate* delegate);
22 ~SingleWebContentsDialogManagerCocoa() override;
24 // SingleWebContentsDialogManager overrides.
25 void Show() override;
26 void Hide() override;
27 void Close() override;
28 void Focus() override;
29 void Pulse() override;
30 void HostChanged(web_modal::WebContentsModalDialogHost* new_host) override;
31 gfx::NativeWindow dialog() override;
33 private:
34 ConstrainedWindowMac* client_; // Weak. Can be null.
35 base::scoped_nsprotocol<id<ConstrainedWindowSheet>> sheet_;
36 // Weak. Owns this.
37 web_modal::SingleWebContentsDialogManagerDelegate* delegate_;
38 bool shown_;
40 DISALLOW_COPY_AND_ASSIGN(SingleWebContentsDialogManagerCocoa);
43 #endif // CHROME_BROWSER_UI_COCOA_SINGLE_WEB_CONTENTS_DIALOG_MANAGER_COCOA_H_