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

Side by Side Diff: components/app_modal_dialogs/javascript_dialog_manager_client.h

Issue 666533007: Move JavaScriptDialogManager, JavascriptAppModalDialogViews to components/app_modal_dialogs (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 6 years, 1 month 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_APP_MODAL_DIALOGS_JAVASCRIPT_DIALOG_MANAGER_CLIENT_H_
6 #define COMPONENTS_APP_MODAL_DIALOGS_JAVASCRIPT_DIALOG_MANAGER_CLIENT_H_
7
8 #include <string>
9
10 #include "base/memory/scoped_ptr.h"
11 #include "ui/gfx/native_widget_types.h"
12
13 class GURL;
14 class NativeAppModalDialog;
15 class JavaScriptAppModalDialog;
Avi (use Gerrit) 2014/10/29 17:40:57 Alphabetize
oshima 2014/10/31 15:54:45 Done.
16
17 namespace content {
18 class WebContents;
19 }
20
21 class JavaScriptDialogManagerClient {
22 public:
23 virtual ~JavaScriptDialogManagerClient() {}
24
25 // Creates an app modal dialog for a JavaScript prompt;
26 virtual NativeAppModalDialog* CreateNativeJavaScriptPrompt(
27 JavaScriptAppModalDialog* dialog,
28 gfx::NativeWindow parent_window) = 0;
Avi (use Gerrit) 2014/10/29 17:40:57 I'm having trouble getting my head around this. Em
oshima 2014/10/31 15:54:45 app_modal_dialog provides the basic framework for
29
30 // Called when the extension associated with |web_contents| opened
31 // a dialog. The embedder should increment its keep alive count so
32 // that its lazy background page can stay alive.
33 virtual void IncrementLazyKeepaliveCount(
34 content::WebContents* web_contents) = 0;
35
36 // Called when a dialog created by the extension associated with
37 // |web_contents| is closed. The embedder should decrement
38 // its keep alive count so that the extension can shutdown
39 // its lazy background page.
40 virtual void DecrementLazyKeepaliveCount(
41 content::WebContents* web_contents) = 0;
42
43 // Sets the name of the extensions associated with the |web_contents|
44 // in the |name_out|, and returns true. If there is no extension associated
45 // with the |web_contents|, returns false.
46 virtual bool GetExtensionName(content::WebContents* web_contents,
47 const GURL& origin_url,
48 std::string* name_out) = 0;
Avi (use Gerrit) 2014/10/29 17:40:57 I'm kinda weirded out by these three calls. Does t
oshima 2014/10/31 15:54:45 app_modal_dialog assume existence of extensions (e
49 };
50
51 void SetJavaScriptDialogManagerClient(
52 scoped_ptr<JavaScriptDialogManagerClient> client);
53
54 JavaScriptDialogManagerClient* GetJavaScriptDialogManagerClient();
55
56 #endif // COMPONENTS_APP_MODAL_DIALOGS_JAVASCRIPT_DIALOG_MANAGER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698