OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_VIEWS_CLIENT_H_ | 5 #ifndef COMPONENTS_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_VIEWS_CLIENT_H_ |
6 #define COMPONENTS_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_VIEWS_CLIENT_H_ | 6 #define COMPONENTS_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_VIEWS_CLIENT_H_ |
7 | 7 |
8 #include "ui/gfx/native_widget_types.h" | 8 #include "ui/gfx/native_widget_types.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
11 class WebContents; | 11 class WebContents; |
12 } | 12 } |
13 | 13 |
14 namespace web_modal { | 14 namespace web_modal { |
15 class ModalDialogHost; | 15 class ModalDialogHost; |
16 } | 16 } |
17 | 17 |
18 namespace constrained_window { | 18 namespace constrained_window { |
19 | 19 |
20 class ConstrainedWindowViewsClient { | 20 class ConstrainedWindowViewsClient { |
21 public: | 21 public: |
22 virtual ~ConstrainedWindowViewsClient() {} | 22 virtual ~ConstrainedWindowViewsClient() {} |
23 | 23 |
24 // Returns the web contents that a constrained window should be modal to | |
25 // in the embedder's context. | |
26 virtual content::WebContents* GetEmbedderWebContents( | |
27 content::WebContents* initiator_web_contents) = 0; | |
28 | |
29 // Returns the modal window host for the |parent| native window. | 24 // Returns the modal window host for the |parent| native window. |
30 virtual web_modal::ModalDialogHost* GetModalDialogHost( | 25 virtual web_modal::ModalDialogHost* GetModalDialogHost( |
31 gfx::NativeWindow parent) = 0; | 26 gfx::NativeWindow parent) = 0; |
32 | 27 |
33 // Returns the native view in |window| appropriate for positioning dialogs. | 28 // Returns the native view in |window| appropriate for positioning dialogs. |
34 virtual gfx::NativeView GetDialogHostView(gfx::NativeWindow window) = 0; | 29 virtual gfx::NativeView GetDialogHostView(gfx::NativeWindow window) = 0; |
35 }; | 30 }; |
36 | 31 |
37 } // namespace constrained window | 32 } // namespace constrained window |
38 | 33 |
39 #endif // COMPONENTS_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_VIEWS_CLIENT_H_ | 34 #endif // COMPONENTS_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_VIEWS_CLIENT_H_ |
OLD | NEW |