0
Commit Graph

230 Commits

Author SHA1 Message Date
238ca86df5 Pepper: Add SetRecordDownloadProgress() to pp::URLRequestInfo (C++ wrapper).
It was MIA for some reason.

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/6726014

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79184 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-23 21:26:59 +00:00
9888f134c6 A proposal and implementation for an initial postMessage interface. These interfaces will allow JavaScript to send data asynchronously to a module instance, and the module instance to asynchronously send data to a JavaScript message handler.
Note, I did something differently from other per-instance interfaces.  While the C interface has 'PPB_Messaging' and 'PPP_Messaging' separate from the Instance interfaces, I stuck the per-instance messaging in to pp::Instance.  It seems more intuitive to me, and doesn't have the drawbacks of having too many functions in the C layer instance interfaces.  Happy to back off of that position, but it's worth a shot.

Overview:
  From JavaScript, you can invoke 'postMessage' on the embedded module.  That results in a call to 'PPP_Messaging::HandleMessage'.

  From Native Code, you can invoke 'PPB_Messaging::PostMessage', which results
  in a call to an 'onmessage' function on the DOM element for the module
  instance in the JavaScript code (if one has been registered).

  Please see the included example or the examples in the comments of
  PPB_Messaging and PPP_Messaging.

Restrictions:
- This implementation is synchronous. A later CL will make it asynchronous.
- This implementation supports only intrinsic values and strings (all types that PP_Var supports except for objects). Object & array support will come later.
- This implementation only allows for 1 channel per instance. You can not expose other 'channels' or 'ports'.  Future CLs will add support for MessagePorts.

BUG=None
TEST=test_post_message.h/.cc

(This CL replaces http://codereview.chromium.org/6538028/ )
Review URL: http://codereview.chromium.org/6716005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79178 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-23 21:07:15 +00:00
bd3f4b3da8 Add IDL Lexer
This lexer understands standard IDL tokens which are similar to 'C'.
INT, HEX, FLOAT, QUOTE and SYMBOL.   SYMBOL can then also become a
KEYWORD such as enum, interface, struct, typedef...

R=ncbray@google.com
BUG=76237
TEST=python idl_lexer.py --test_expect --test_same test_lex.in

Review URL: http://codereview.chromium.org/6697028

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79169 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-23 20:01:40 +00:00
030ea0b2e4 PPB_CursorControl_Dev.SetCursor: Add support for custom cursor.
BUG=none
TEST=none

Review URL: http://codereview.chromium.org/6720001

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79168 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-23 19:55:45 +00:00
7af3e12bec Minor changes to the comments of ResourceTracker and PP_ImageDataFormat.
BUG=none
TEST=none

R=brettw@chromium.org

Review URL: http://codereview.chromium.org/6727028

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79156 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-23 18:23:57 +00:00
b574626479 Remove PPB_Var interface's scripting functionality.
PPB_Var now only deals with the PPB_Var datatype. PPB_Var_Deprecated provides scripting for legacy users, post message API will be the replacement in the future.

BUG=76453
TEST=none

Review URL: http://codereview.chromium.org/6673098

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79139 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-23 17:06:31 +00:00
80d1a8c244 Unbreak compilation of ppapi examples.
BUG=none
TEST=Examples from ppapi/examples compile.

Review URL: http://codereview.chromium.org/6676072

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79025 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-22 20:05:04 +00:00
62af476259 fix comments
BUG=None
TEST=None
TBR=rvargas@chromium.org

Review URL: http://codereview.chromium.org/6715024

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78977 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-22 12:07:47 +00:00
0f40210bff Add an (unimplemented) API for getting the available list of font families on
the system.
Review URL: http://codereview.chromium.org/6708043

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78817 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-19 06:05:08 +00:00
9ca245e3b2 Implement a proxy for URL util. Some of the implementation that doesn't need to
be proxied moved into a new shared_impl file, which required a decent amount of
glue to make it callable from both the implementation and the proxy. The payoff
here is only marginal since the code is fairly simple, but I decided this is
still better than duplication.

This also includes some comments from my audio patch that I forgot in that CL.

BUG=none
TEST=ppapi_tests run out of process pass
Review URL: http://codereview.chromium.org/6676045

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78646 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-18 01:50:31 +00:00
e503a12601 Creates the ipclist utility that chrome security team has wanted to dump
the known IPC messages.  Going forward, this should help identify new messages
between versions of chrome so that they may be given extra scrutiny for 
potential badness.


under the common_message_generator.h umbrella.
Review URL: http://codereview.chromium.org/6646005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78564 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-17 18:20:52 +00:00
cf69668eba Build skia as a dll in windows multi-dll build.
BUG=75686
TEST=none
Review URL: http://codereview.chromium.org/6682011

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78510 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-17 03:05:55 +00:00
37b01e6d24 Updated/rewrote documentation.
Review URL: http://codereview.chromium.org/6646057

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78384 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-16 17:11:43 +00:00
26f9e71c23 Run PPB_CharSet_Dev logic directly in the plugin process.
- Move part of the character set conversion logic into ppapi/shared_impl/char_set_impl.{h,cc}.
- Change ppb_char_set_proxy to use it directly in the plugin process.
- Another minor change is to avoid using malloc/free during character set conversion, and use PPB_Core.MemAlloc/MemFree instead.

BUG=none
TEST=Pass test_char_set.{h,cc}

Review URL: http://codereview.chromium.org/6694011

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78232 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-15 17:57:00 +00:00
631179b1e6 Convert ppapi messages to new format.
Review URL: http://codereview.chromium.org/6686057

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78103 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-14 22:26:20 +00:00
5349184cc7 Pepper: Add a property to URLRequestInfo to skip header validation.
The resulting URLRequestInfo is then only usable with a (trusted) URLLoader
which has universal access.

BUG=75350
TEST=none

Review URL: http://codereview.chromium.org/6652014

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78047 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-14 17:19:49 +00:00
037f63fb8e Prevent Pepper plugin reentrancy for synchronous messages except for script
calls where reentrancy is required.
Review URL: http://codereview.chromium.org/6625045

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77967 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-13 19:44:46 +00:00
d38c5740cd Add a console interface for logging to the JS console from a PPAPI plugin.
TEST=manual
Review URL: http://codereview.chromium.org/6667010

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77852 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-11 20:20:56 +00:00
2cc0622486 Ensure that PP_Instance values are unique within a plugin process in addition
to within the renderer.

This works by having the renderer check with the plugin that a PP_Instance is
available before using it. If it's already seen, the renderer will generate a
new PP_Instance and retry.

For performance, this message is handled on the I/O thread of the plugin so it
will not be blocked by the actual plugin code.

This requires an unfortunate amount of plumbing. Since the renderer can't
depend directly on the proxy, we have a new PPB_Proxy function to set the
verification function used to perform this check.

There is also a new plugin dispatcher delegate where I moved some of the global
state to that used to go into the init function. Adding yet another parameter
there seemed unfortunate.

TEST=manual
BUG=74961
Review URL: http://codereview.chromium.org/6628019

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77693 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-10 21:16:34 +00:00
e5c4da1c0f Clarify the behavior of PaintImageData.
Review URL: http://codereview.chromium.org/6658038

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77687 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-10 20:16:19 +00:00
cb66596fd7 Add some more documentation from a recent ppapi discussion.
BUG=none
TEST=trybots

Review URL: http://codereview.chromium.org/6656016

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77668 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-10 19:12:10 +00:00
5651386fa8 Added link to ppb.h to point to list of valid interface names. Wrote/rewrote docs in ppb_image_data.h
Review URL: http://codereview.chromium.org/6603029

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77548 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-09 23:25:53 +00:00
5cf8a5b628 Pepper/Flapper: Implement proxy for clipboard stuff.
BUG=none
TEST=none

Review URL: http://codereview.chromium.org/6650029

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77491 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-09 19:00:05 +00:00
c32a97f251 Clarify/fix fullscreen semantics, and add GetScreenSize
BUG=none
TEST=youtube, nba, amazon

Review URL: http://codereview.chromium.org/6625034

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77229 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-08 01:55:52 +00:00
75eaa83cc0 Pepper: spelling correction: Resove -> Resolve
BUG=none
TEST=none
TBR=brettw@chromium.org

Review URL: http://codereview.chromium.org/6623043

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77091 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-06 21:05:29 +00:00
a23d37bf00 New assets for PDF progress control. Added asset for drop shadow.
BUG=71506
TEST=none


Review URL: http://codereview.chromium.org/6626030

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76998 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-04 23:42:44 +00:00
6775e40aeb Change other usages of .size() to .empty() when applicable.
BUG=carnitas
TEST=compiles

Review URL: http://codereview.chromium.org/6609008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76962 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-04 21:03:47 +00:00
e51a270e54 Adding missing forward declaration of struct PP_CompletionCallback.
BUG=none
TEST=none
Patch by sanga@google.com
Original review http://codereview.chromium.org/6626001/

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76925 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-04 17:22:24 +00:00
c5f29a5ef0 Pepper/Flapper: Add very basic clipboard support.
Note that this is a trusted private interface; we rely on Flash to do a user
action check.

BUG=none
TEST=Trung can cut-and-paste in his Flapper

Review URL: http://codereview.chromium.org/6611034

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76857 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-04 01:43:39 +00:00
d2135bbf2b Adding resources for PDF loading progress control.
BUG=none
TEST=none


Review URL: http://codereview.chromium.org/6612022

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76838 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-03 23:49:47 +00:00
9d163cb15e Minor doc changes. Mostly commented out TODO and {PENDING notes that engineers had made.
Review URL: http://codereview.chromium.org/6588085

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76795 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-03 20:28:59 +00:00
11e04ce0c6 Implement the grab/grabbing cursors (for Mac/GTK).
BUG=73356
TEST=comment 12 on the bug has a test page; ensure the last two cursors (grab and grabbing) show open and closed hand cursors (respectively) and don't crash

Review URL: http://codereview.chromium.org/6591105

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76616 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-02 21:29:36 +00:00
b45c651999 Add PPB_URLUtil_Dev::GetDocumentURL
This also renames "Url" into "URL" for consistency.

BUG=74569
TEST=http://www.espn.go.com/nba/

Review URL: http://codereview.chromium.org/6594107

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76608 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-02 21:04:28 +00:00
d062d9636f Pepper/Flapper: Get rid of unimplemented private file ref stuff and implement proxy.
BUG=none
TEST=builds? works?

Review URL: http://codereview.chromium.org/6594099

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76488 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-02 01:27:26 +00:00
ce8096fb4b Pepper/Flapper: Add an interface to do sync file ops on FileRefs.
Such FileRefs are typically obtained from the Pepper file chooser. The interface
corresponds exactly to the one for module-local files. (The implementation is
only enabled if Flapper hacks are enabled.)

BUG=none
TEST=Flapper file uploads work for me

Review URL: http://codereview.chromium.org/6592071

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76446 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-01 22:28:01 +00:00
2a5bfd8861 Removed variables sections in DoxygenLayOut. Changed header to point to new css file to be consite compliant.
Review URL: http://codereview.chromium.org/6591078

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76412 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-01 20:13:30 +00:00
36dbfe198c Moved creation of GPU command buffer shared memory into the browser process.
This is to allow the GPU process to be sandboxed on all platforms.

TEST=try, run WebGL app on win and mac.
BUG=none

Review URL: http://codereview.chromium.org/6588029

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76307 0039d316-1c4b-4281-b951-d872f2087c98
2011-02-28 23:36:54 +00:00
95caad2e61 Don't allow multiple opens for Pepper FileSystem.
BUG=73667
TEST=test_file_system.{h,cc}

Review URL: http://codereview.chromium.org/6596026

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76278 0039d316-1c4b-4281-b951-d872f2087c98
2011-02-28 22:17:15 +00:00
e1e675a864 Review URL: http://codereview.chromium.org/6502007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76256 0039d316-1c4b-4281-b951-d872f2087c98
2011-02-28 20:41:02 +00:00
1c51cf7bcd Fix compiling on gcc-4.6.
This change removes invalid direct calls to constructors and replaces NULL to 0 as workarounds for a compiler bug of gcc 4.6.

Patch from Maarten Lankhorst <m.b.lankhorst@gmail.com>.

BUG=none
TEST=fix builds on gcc 4.6
Review URL: http://codereview.chromium.org/6596005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76046 0039d316-1c4b-4281-b951-d872f2087c98
2011-02-25 13:39:41 +00:00
db0f57f529 Factor fd sharing code in proxy and fix fd issues once and for all.
BUG=none
TEST=use flapper, go to youtube, make plugin crash and check no warning about close() failing.

Review URL: http://codereview.chromium.org/6580050

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76026 0039d316-1c4b-4281-b951-d872f2087c98
2011-02-25 03:54:54 +00:00
0100b7a275 Moved creation of GPU transfer buffers into the browser process.
Transfer buffer creation was previously done in the GPU process. This is one step required to sandbox the GPU process.

Rather than the GPU process opening a renderer process's handle by PID, which can't been done when sandboxed on Windows, the browser process passes the handle to the GPU process via the renderer process.

TEST=try
BUG=none

Review URL: http://codereview.chromium.org/6557006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75980 0039d316-1c4b-4281-b951-d872f2087c98
2011-02-24 22:54:50 +00:00
41869539b9 Pin the PPAPI custom cursor value. PPAPI is intended to be frozen, so make space now for expanding the number of named cursors.
BUG=73356
TEST=no visible change; PPAPI custom cursors are currently not implemented anyway

Review URL: http://codereview.chromium.org/6576034

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75928 0039d316-1c4b-4281-b951-d872f2087c98
2011-02-24 19:19:13 +00:00
d07fa37911 PPB_Flash cleanup part 2: move all the file stuff to ppb_flash_file.*.
ppb_flash_file.* is intended to contain multiple (very similar) interfaces, of
which the ModuleLocal stuff is one.

BUG=none
TEST="everything" still works

Review URL: http://codereview.chromium.org/6579026

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75921 0039d316-1c4b-4281-b951-d872f2087c98
2011-02-24 18:58:01 +00:00
d0f08a6dac Pepper: Increment the version numbers for PPB_{FileRef,FileSystem}_Dev.
The PP_FileSystemType_Dev enum was changed in r75566, implicitly changing these
interfaces (whose revision numbers weren't changed).

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/6579018

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75806 0039d316-1c4b-4281-b951-d872f2087c98
2011-02-23 22:37:56 +00:00
9d9f1bb2aa PPB_Flash cleanup part 1: move the net connector stuff to its own files.
BUG=none
TEST=builds

Review URL: http://codereview.chromium.org/6578007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75800 0039d316-1c4b-4281-b951-d872f2087c98
2011-02-23 22:10:57 +00:00
e6651eeb40 Add some files to the C compilation test, and fix the stuff that wasn't C compatible.
TEST=test_c_includes.c compiles successfully
BUG=None

Review URL: http://codereview.chromium.org/6542064

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75796 0039d316-1c4b-4281-b951-d872f2087c98
2011-02-23 21:46:38 +00:00
be60b9a5c9 Dup command-buffer SHM handle before auto-closing.
This also adds error logging to the various places we close file descriptors, to help diagnosing future similar issues.

BUG=none
TEST=Pepper Flash + youtube in oop with --enable-accelerated-plugins

Review URL: http://codereview.chromium.org/6549037

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75792 0039d316-1c4b-4281-b951-d872f2087c98
2011-02-23 21:37:41 +00:00
ce482dfe39 Implement the filesystem proxy. This allows the FileRef tests (the ones which
don't use FileIO which isn't don yet) to pass in the proxy.

Hook up the code from the URLLoader that downloads to a file. This allows all
URLLoader tests to pass in the proxy.

Change code in dispatcher that zeros out the array to take into account
padding. It was only zero-filling half of the array since sizeof(enum) * # elts
seems to be half as large as the actual array due to padding on 64-bit systems.

Make the aborted completion callbacks run asynchronously. This was caught by
one of the file ref tests. We really need a system for doing this better, but
I don't want to do that in this patch.

TEST=ppapi_tests run under proxy
Review URL: http://codereview.chromium.org/6543028

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75566 0039d316-1c4b-4281-b951-d872f2087c98
2011-02-21 23:49:16 +00:00
4deeb43f8b Implement proxying for FileRef and FileChooser.
This also changes the FileRef interface to remove the Query function, since
there is no close function, there's no way to cancel the current request, which
makes memory management of the info structure very difficult.

Review URL: http://codereview.chromium.org/6519057

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75331 0039d316-1c4b-4281-b951-d872f2087c98
2011-02-17 23:59:39 +00:00