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 CHROME_BROWSER_UI_NATIVE_WINDOW_TRACKER_H_ | 5 #ifndef COMPONENTS_APP_MODAL_DIALOGS_JAVASCRIPT_NATIVE_DIALOG_FACTORY_H_ |
6 #define CHROME_BROWSER_UI_NATIVE_WINDOW_TRACKER_H_ | 6 #define COMPONENTS_APP_MODAL_DIALOGS_JAVASCRIPT_NATIVE_DIALOG_FACTORY_H_ |
| 7 |
| 8 #include <string> |
7 | 9 |
8 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
9 #include "ui/gfx/native_widget_types.h" | 11 #include "ui/gfx/native_widget_types.h" |
10 | 12 |
11 // An observer which detects when a gfx::NativeWindow is closed. | 13 class GURL; |
12 class NativeWindowTracker { | 14 class JavaScriptAppModalDialog; |
| 15 class NativeAppModalDialog; |
| 16 |
| 17 class JavaScriptNativeDialogFactory { |
13 public: | 18 public: |
14 virtual ~NativeWindowTracker() {} | 19 virtual ~JavaScriptNativeDialogFactory() {} |
15 | 20 |
16 static scoped_ptr<NativeWindowTracker> Create(gfx::NativeWindow window); | 21 // Creates an native modal dialog for a JavaScript dialog; |
17 | 22 virtual NativeAppModalDialog* CreateNativeJavaScriptDialog( |
18 // Returns true if the native window passed to Create() has been closed. | 23 JavaScriptAppModalDialog* dialog, |
19 virtual bool WasNativeWindowClosed() const = 0; | 24 gfx::NativeWindow parent_window) = 0; |
20 }; | 25 }; |
21 | 26 |
22 #endif // CHROME_BROWSER_UI_NATIVE_WINDOW_TRACKER_H_ | 27 #endif // COMPONENTS_APP_MODAL_DIALOGS_JAVASCRIPT_NATIVE_DIALOG_FACTORY_H_ |
OLD | NEW |