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

Side by Side Diff: chrome/browser/ui/web_contents_modal_dialog_host.h

Issue 14969012: components: Create web_modal component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 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.
4
5 #ifndef CHROME_BROWSER_UI_WEB_CONTENTS_MODAL_DIALOG_HOST_H_
6 #define CHROME_BROWSER_UI_WEB_CONTENTS_MODAL_DIALOG_HOST_H_
7
8 #include "ui/gfx/point.h"
9 #include "ui/gfx/size.h"
10
11 // Observer to be implemented to update web contents modal dialogs when the host
12 // indicates their position needs to be changed.
13 class WebContentsModalDialogHostObserver {
14 public:
15 virtual ~WebContentsModalDialogHostObserver();
16
17 virtual void OnPositionRequiresUpdate() = 0;
18
19 protected:
20 WebContentsModalDialogHostObserver();
21
22 private:
23 DISALLOW_COPY_AND_ASSIGN(WebContentsModalDialogHostObserver);
24 };
25
26 // Interface for supporting positioning of web contents modal dialogs over a
27 // window/widget.
28 class WebContentsModalDialogHost {
29 public:
30 virtual ~WebContentsModalDialogHost();
31
32 virtual gfx::Point GetDialogPosition(const gfx::Size& size) = 0;
33
34 // Add/remove observer.
35 virtual void AddObserver(WebContentsModalDialogHostObserver* observer) = 0;
36 virtual void RemoveObserver(WebContentsModalDialogHostObserver* observer) = 0;
37
38 protected:
39 WebContentsModalDialogHost();
40
41 private:
42 DISALLOW_COPY_AND_ASSIGN(WebContentsModalDialogHost);
43 };
44
45 #endif // CHROME_BROWSER_UI_WEB_CONTENTS_MODAL_DIALOG_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698