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

Side by Side Diff: content/renderer/browser_plugin/browser_plugin_bindings.cc

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
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "content/renderer/browser_plugin/browser_plugin_bindings.h" 5 #include "content/renderer/browser_plugin/browser_plugin_bindings.h"
6 6
7 #include <cstdlib> 7 #include <cstdlib>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 private: 346 private:
347 DISALLOW_COPY_AND_ASSIGN(BrowserPluginBindingTrackObjectLifetime); 347 DISALLOW_COPY_AND_ASSIGN(BrowserPluginBindingTrackObjectLifetime);
348 }; 348 };
349 349
350 // Note: This is a method that is used internally by the <webview> shim only. 350 // Note: This is a method that is used internally by the <webview> shim only.
351 // This should not be exposed to developers. 351 // This should not be exposed to developers.
352 class BrowserPluginBindingSetPermission : public BrowserPluginMethodBinding { 352 class BrowserPluginBindingSetPermission : public BrowserPluginMethodBinding {
353 public: 353 public:
354 BrowserPluginBindingSetPermission() 354 BrowserPluginBindingSetPermission()
355 : BrowserPluginMethodBinding( 355 : BrowserPluginMethodBinding(
356 browser_plugin::kMethodInternalSetPermission, 2) { 356 browser_plugin::kMethodInternalSetPermission, 3) {
357 } 357 }
358 358
359 virtual bool Invoke(BrowserPluginBindings* bindings, 359 virtual bool Invoke(BrowserPluginBindings* bindings,
360 const NPVariant* args, 360 const NPVariant* args,
361 NPVariant* result) OVERRIDE { 361 NPVariant* result) OVERRIDE {
362 int request_id = IntFromNPVariant(args[0]); 362 int request_id = IntFromNPVariant(args[0]);
363 bool allow = NPVARIANT_TO_BOOLEAN(args[1]); 363 bool allow = NPVARIANT_TO_BOOLEAN(args[1]);
364 bindings->instance()->OnEmbedderDecidedPermission(request_id, allow); 364 std::string user_input = StringFromNPVariant(args[2]);
365 bindings->instance()->OnEmbedderDecidedPermission(
366 request_id, allow, user_input);
365 return true; 367 return true;
366 } 368 }
367 369
368 private: 370 private:
369 DISALLOW_COPY_AND_ASSIGN(BrowserPluginBindingSetPermission); 371 DISALLOW_COPY_AND_ASSIGN(BrowserPluginBindingSetPermission);
370 }; 372 };
371 373
372 // BrowserPluginPropertyBinding ------------------------------------------------ 374 // BrowserPluginPropertyBinding ------------------------------------------------
373 375
374 class BrowserPluginPropertyBinding { 376 class BrowserPluginPropertyBinding {
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 for (PropertyBindingList::iterator iter = property_bindings_.begin(); 815 for (PropertyBindingList::iterator iter = property_bindings_.begin();
814 iter != property_bindings_.end(); 816 iter != property_bindings_.end();
815 ++iter) { 817 ++iter) {
816 if ((*iter)->MatchesName(name)) 818 if ((*iter)->MatchesName(name))
817 return (*iter)->GetProperty(this, result); 819 return (*iter)->GetProperty(this, result);
818 } 820 }
819 return false; 821 return false;
820 } 822 }
821 823
822 } // namespace content 824 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698