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

Side by Side Diff: content/renderer/browser_plugin/browser_plugin.h

Issue 19679002: <webview>: Implement dialog API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed test Created 7 years, 5 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ 5 #ifndef CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_
6 #define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ 6 #define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_
7 7
8 #include "third_party/WebKit/public/web/WebPlugin.h" 8 #include "third_party/WebKit/public/web/WebPlugin.h"
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 void TrackObjectLifetime(const NPVariant* request, int id); 123 void TrackObjectLifetime(const NPVariant* request, int id);
124 124
125 // Returns true if |point| lies within the bounds of the plugin rectangle. 125 // Returns true if |point| lies within the bounds of the plugin rectangle.
126 // Not OK to use this function for making security-sensitive decision since it 126 // Not OK to use this function for making security-sensitive decision since it
127 // can return false positives when the plugin has rotation transformation 127 // can return false positives when the plugin has rotation transformation
128 // applied. 128 // applied.
129 bool InBounds(const gfx::Point& point) const; 129 bool InBounds(const gfx::Point& point) const;
130 130
131 gfx::Point ToLocalCoordinates(const gfx::Point& point) const; 131 gfx::Point ToLocalCoordinates(const gfx::Point& point) const;
132 // Called by browser plugin binding. 132 // Called by browser plugin binding.
133 void OnEmbedderDecidedPermission(int request_id, bool allow); 133 void OnEmbedderDecidedPermission(int request_id, bool allow,
134 const std::string& user_input);
134 135
135 // Called when a guest instance ID has been allocated by the browser process. 136 // Called when a guest instance ID has been allocated by the browser process.
136 void OnInstanceIDAllocated(int guest_instance_id); 137 void OnInstanceIDAllocated(int guest_instance_id);
137 // Provided that a guest instance ID has been allocated, this method attaches 138 // Provided that a guest instance ID has been allocated, this method attaches
138 // this BrowserPlugin instance to that guest. |extra_params| are parameters 139 // this BrowserPlugin instance to that guest. |extra_params| are parameters
139 // passed in by the content embedder to the browser process. 140 // passed in by the content embedder to the browser process.
140 void Attach(scoped_ptr<base::DictionaryValue> extra_params); 141 void Attach(scoped_ptr<base::DictionaryValue> extra_params);
141 142
142 // Notify the plugin about a compositor commit so that frame ACKs could be 143 // Notify the plugin about a compositor commit so that frame ACKs could be
143 // sent, if needed. 144 // sent, if needed.
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 286
286 // Indicates whether the |pending_damage_buffer_| was used to copy over pixels 287 // Indicates whether the |pending_damage_buffer_| was used to copy over pixels
287 // given the provided |params|. 288 // given the provided |params|.
288 bool UsesPendingDamageBuffer( 289 bool UsesPendingDamageBuffer(
289 const BrowserPluginMsg_UpdateRect_Params& params); 290 const BrowserPluginMsg_UpdateRect_Params& params);
290 291
291 void AddPermissionRequestToSet(int request_id); 292 void AddPermissionRequestToSet(int request_id);
292 293
293 // Informs the BrowserPlugin that the guest's permission request has been 294 // Informs the BrowserPlugin that the guest's permission request has been
294 // allowed or denied by the embedder. 295 // allowed or denied by the embedder.
295 void RespondPermission(int request_id, bool allow); 296 void RespondPermission(int request_id,
297 bool allow,
298 const std::string& user_input);
296 299
297 // If the request with id |request_id| is pending then informs the 300 // If the request with id |request_id| is pending then informs the
298 // BrowserPlugin that the guest's permission request has been allowed or 301 // BrowserPlugin that the guest's permission request has been allowed or
299 // denied by the embedder. 302 // denied by the embedder.
300 void RespondPermissionIfRequestIsPending(int request_id, bool allow); 303 void RespondPermissionIfRequestIsPending(int request_id,
304 bool allow,
305 const std::string& user_input);
301 306
302 // Called when the tracked object of |id| ID becomes unreachable in 307 // Called when the tracked object of |id| ID becomes unreachable in
303 // JavaScript. 308 // JavaScript.
304 void OnTrackedObjectGarbageCollected(int id); 309 void OnTrackedObjectGarbageCollected(int id);
305 // V8 garbage collection callback for |object|. 310 // V8 garbage collection callback for |object|.
306 static void WeakCallbackForTrackedObject(v8::Isolate* isolate, 311 static void WeakCallbackForTrackedObject(v8::Isolate* isolate,
307 v8::Persistent<v8::Value>* object, 312 v8::Persistent<v8::Value>* object,
308 void* param); 313 void* param);
309 314
310 // IPC message handlers. 315 // IPC message handlers.
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 base::WeakPtrFactory<BrowserPlugin> weak_ptr_factory_; 402 base::WeakPtrFactory<BrowserPlugin> weak_ptr_factory_;
398 403
399 std::vector<EditCommand> edit_commands_; 404 std::vector<EditCommand> edit_commands_;
400 405
401 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); 406 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin);
402 }; 407 };
403 408
404 } // namespace content 409 } // namespace content
405 410
406 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ 411 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_
OLDNEW
« no previous file with comments | « content/common/browser_plugin/browser_plugin_messages.h ('k') | content/renderer/browser_plugin/browser_plugin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698