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

Side by Side Diff: content/public/browser/browser_plugin_guest_delegate.h

Issue 239143007: <webview>: Move JavaScript Dialog API to chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_pointer_lock_to_chrome
Patch Set: Addressed nits Created 6 years, 8 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_ 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "base/process/kill.h" 9 #include "base/process/kill.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
11 #include "base/values.h" 11 #include "base/values.h"
12 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
13 #include "content/public/common/browser_plugin_permission_type.h" 13 #include "content/public/common/browser_plugin_permission_type.h"
14 #include "content/public/common/media_stream_request.h" 14 #include "content/public/common/media_stream_request.h"
15 #include "ui/gfx/geometry/rect.h" 15 #include "ui/gfx/geometry/rect.h"
16 #include "ui/gfx/size.h" 16 #include "ui/gfx/size.h"
17 #include "url/gurl.h" 17 #include "url/gurl.h"
18 18
19 namespace content { 19 namespace content {
20 20
21 class JavaScriptDialogManager;
21 struct NativeWebKeyboardEvent; 22 struct NativeWebKeyboardEvent;
22 23
23 // Objects implement this interface to get notified about changes in the guest 24 // Objects implement this interface to get notified about changes in the guest
24 // WebContents and to provide necessary functionality. 25 // WebContents and to provide necessary functionality.
25 class CONTENT_EXPORT BrowserPluginGuestDelegate { 26 class CONTENT_EXPORT BrowserPluginGuestDelegate {
26 public: 27 public:
27 virtual ~BrowserPluginGuestDelegate() {} 28 virtual ~BrowserPluginGuestDelegate() {}
28 29
29 // Add a message to the console. 30 // Add a message to the console.
30 virtual void AddMessageToConsole(int32 level, 31 virtual void AddMessageToConsole(int32 level,
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 virtual void CanDownload(const std::string& request_method, 116 virtual void CanDownload(const std::string& request_method,
116 const GURL& url, 117 const GURL& url,
117 const base::Callback<void(bool)>& callback); 118 const base::Callback<void(bool)>& callback);
118 119
119 // Asks the delegate if the given guest can lock the pointer. 120 // Asks the delegate if the given guest can lock the pointer.
120 // Invoking the |callback| synchronously is OK. 121 // Invoking the |callback| synchronously is OK.
121 virtual void RequestPointerLockPermission( 122 virtual void RequestPointerLockPermission(
122 bool user_gesture, 123 bool user_gesture,
123 bool last_unlocked_by_target, 124 bool last_unlocked_by_target,
124 const base::Callback<void(bool)>& callback) {} 125 const base::Callback<void(bool)>& callback) {}
126
127 // Returns a pointer to a service to manage JavaScript dialogs. May return
128 // NULL in which case dialogs aren't shown.
129 virtual JavaScriptDialogManager* GetJavaScriptDialogManager();
125 }; 130 };
126 131
127 } // namespace content 132 } // namespace content
128 133
129 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_ 134 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/common/browser_plugin/browser_plugin_constants.cc ('k') | content/public/browser/browser_plugin_guest_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698