summaryrefslogtreecommitdiffstats
path: root/content/browser/browser_thread.h
Commit message (Collapse)AuthorAgeFilesLines
* Annotate all of the functions in content that need to be exported, in ↵dpranke@chromium.org2011-09-131-1/+2
| | | | | | | | | | | | preparation for creating a content shared library. R=darin@chromium.org, jam@chromium.org, willchan@chromium.org BUG=90442 TEST=everything still compiles Review URL: http://codereview.chromium.org/7800015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100975 0039d316-1c4b-4281-b951-d872f2087c98
* Implementation of PostTaskAndReply() in MessageLoopProxy and BrowserThread.ajwong@chromium.org2011-08-181-0/+6
| | | | | | | | | | | | | This ensures that the request/reply closures are always deleted on the origin thread, or leaked if the task cannot be completed (due to message loop shutdown). BUG=86301 TEST=new unittests Review URL: http://codereview.chromium.org/7210053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97387 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the background X11 thread.tony@chromium.org2011-06-011-7/+0
| | | | | | | | | | | | After r87381, we no longer have anything that uses the background X11 thread. I think there's still considerable cleanup that can be done to gtk_native_view_id_manager.*, but I'll do that in a follow up. Review URL: http://codereview.chromium.org/7020013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87548 0039d316-1c4b-4281-b951-d872f2087c98
* revert 87108 and 87076dgrogan@chromium.org2011-05-271-3/+1
| | | | | | TBR=msw_ git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87112 0039d316-1c4b-4281-b951-d872f2087c98
* Fix at least one heapchecker error when running unit tests. If this ↵dgrogan@chromium.org2011-05-271-1/+3
| | | | | | | | | | | | | | temporary fix turns the heapchecker and valgrind bots green then all the errors reported at the URLs below can be suppressed. http://build.chromium.org/p/chromium.memory/builders/Linux%20Tests%20%28valgrind%29%281%29/builds/2473/steps/memory%20test%3A%20unit/logs/stdio http://build.chromium.org/p/chromium.memory/builders/Linux%20Heapcheck/builds/7519/steps/heapcheck%20test%3A%20unit/logs/stdio BUG= TEST=HEAPCHECK=strict llvm/Debug/unit_tests --gtest_filter=IndexedDBQuotaClientTest.GetOriginUsage Review URL: http://codereview.chromium.org/7085013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87108 0039d316-1c4b-4281-b951-d872f2087c98
* Fix gpu acceleration with --in-process-gpu and --single-process modes.sievers@google.com2011-05-271-3/+0
| | | | | | | | | | | | With recent changes that have moved gpu message handling in the browser to the IO thread (and moved the handling of messages between gpu and renderer, that are mediated by the browser, to GpuProcessHost), the routing for such messages was broken when running the gpu thread (rather than process). The new approach is to always instantiate GpuProcessHost (even when running a gpu thread only) and have a real IPC channel between host and gpu thread. This makes the 'in-process' GPU code work similar to what the renderer does when running --single-process. Note that --single-process mode is potentially still a bit fragile with this, since ChildProcess and ChildThread are currently written to only allow a single static instance in one process (it would be better to instantiate GpuProcess and RenderProcess simultaneously), so ambiguous calls to access e.g. the main thread are possible. Review URL: http://codereview.chromium.org/7054005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86958 0039d316-1c4b-4281-b951-d872f2087c98
* Support getting the font list in Pepper. This currently only works out ofbrettw@chromium.org2011-05-181-3/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | process. This adds a function to the font interface to get the font list. Since we don't have arrays or dictionaries in Pepper yet, I used a string with nulls separating the names. A previous attempt to make a "font list resource" proved excessively complicated and not actually much easier for clients to deal with. This refactors the existing font list getting that used to be in the options for the browser. I moved it to content and split it into two pieces, the synchronous version, and then an asynchronous wrapper around that which both the prefs code and the pepper code use. This cleaned up some of the preferences code, and also fixes the leak of the entire font list in the code. I used the new callback/bind system for the async font loading. I had to add BrowserThread support for the new system. This uses the PepperMessageFilter to listen for font load requests from the plugin in the browser process. This is nice because we can add stuff here and have messages serviced for both in-process and out-of-process plugins. This proved to be complicated due to the HostResolver used in some of the existing code, and thread restrictions for how to deal with it. This is why there are two modes for the filter object. I changed the delegates around for the Dispatcher. Now the PluginDispatcher has the delegate interface since the HostDispatcher didn't actually need any of them and we were accumulating a lot of empty functions in the PepperPluginRegistry. It's possible for the fonts to be loaded on Windows and Mac without IPC, since enumerating fonts should be possible inside the sandbox. I didn't implement this since it adds extra complexity and probably doesn't give that much benefit. TEST=manual BUG=none Review URL: http://codereview.chromium.org/7044012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85827 0039d316-1c4b-4281-b951-d872f2087c98
* Websocket to TCP proxy running in a separate thread (only on ChromeOS).dilmah@chromium.org2011-05-101-0/+7
| | | | | | | | | | | | | | | | | | With this webproxy: authorized extensions can connect to ws://127.0.0.1:10101/tcpproxy, pass authorization_token:hostname:port: in first frame, then webproxy establishes TCP connection to hostname:port and forwards any subsequent communication. Subsequent communication between extension and webproxy is base64-encoded. TODO(dilmah): remove this temporary solution, get rid of separate thread and listening socket, instead provide the same functionality via hooks into websocket layer. BUG=chromium-os:9667 TEST=Manual Review URL: http://codereview.chromium.org/6801008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84795 0039d316-1c4b-4281-b951-d872f2087c98
* Encourage reliability of code using browser thread.dmaclach@chromium.org2011-04-051-1/+10
| | | | | | | | | | | | | | | | | | | | I had a leak that occurred because the return value from DeleteSoon was not being checked. It looked like this: { scoped_ptr<AThing> foo = new AThing; BrowserThread browser_ui_thread(BrowserThread::UI, &loop); .... } Turned out the leak occurred because AThing was set to only delete itself on a UI browser thread, but browser_ui_thread was going out of scope before delete was being called. Adding the DLOG to DeleteSoon helps expose these errors. BUG=NONE TEST=BUILD Review URL: http://codereview.chromium.org/6691044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80524 0039d316-1c4b-4281-b951-d872f2087c98
* This is a thread that runs in the browser process that can issue GL calls ↵apatrick@chromium.org2011-03-211-1/+4
| | | | | | | | | | | | | | | | | | | | | | without going via a command buffer. It is for rendering the browser's chrome, basic compositing, etc. It is not for rendering arbitrary content from, for example, WebGL. It is only enabled with --single-process or --in-process-gpu, the latter only running the GPU "process" as a thread inside the browser process. Eventually, the plan is to add strict validation to ensure it can only run basic white-listed shaders and other restrictions so that the browser's GPU thread can be made available to the renderers' compositors without a command line switch. I split GpuThread into two new classes. GpuChildThread derives from ChildThread and contains stuff that should only happen in a standalone process. I included GPUInfo collection here because if the browser should never need to run that. GpuRenderThread contains stuff that is also needed in the browser process. The GPU thread does not use an IPC channel within the browser process. It still uses IPC messages but posts them directly between message loops. I changed the EstablishGpuChannel messages between the browser and GPU process to not deal with returning the GPUInfo. Now the GPU process just sends it as the first thing it does after handling its Init message. This was to allow the separation of GPUInfo collection (in GpuChildThread) and channel establishment (in GpuRenderThread). TEST=trybots, run webgl with no switches, --single-process and --in-process-gpu, check browser terminates cleanly in all cases. BUG=none Review URL: http://codereview.chromium.org/6677055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78945 0039d316-1c4b-4281-b951-d872f2087c98
* Move notification service code to content. We'll need to figure out how to ↵jam@chromium.org2011-03-071-1/+1
| | | | | | | | | split the type enum so that chrome specific parts aren't in content later. TBR=avi Review URL: http://codereview.chromium.org/6627043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77102 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 76168 - Trying changes to see the perfomance impact on Mac.rtenneti@chromium.org2011-02-261-3/+0
| | | | | | | | | | | | | | This change list is same as CL 6588039. Will back out immediately. http://codereview.chromium.org/6588039/ Review URL: http://codereview.chromium.org/6594032 TBR=rtenneti@chromium.org Review URL: http://codereview.chromium.org/6588041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76170 0039d316-1c4b-4281-b951-d872f2087c98
* Trying changes to see the perfomance impact on Mac.rtenneti@chromium.org2011-02-261-0/+3
| | | | | | | | | | | This change list is same as CL 6588039. Will back out immediately. http://codereview.chromium.org/6588039/ Review URL: http://codereview.chromium.org/6594032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76168 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 76156 - Added back thread watcher changes.rtenneti@chromium.org2011-02-261-3/+0
| | | | | | | | | | | | | | | will revert the changes right away. trying to test impact on memory on mac. BUG=73915 TEST=performance tests Review URL: http://codereview.chromium.org/6598021 TBR=rtenneti@chromium.org Review URL: http://codereview.chromium.org/6598022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76157 0039d316-1c4b-4281-b951-d872f2087c98
* Added back thread watcher changes.rtenneti@chromium.org2011-02-261-0/+3
| | | | | | | | | | | | will revert the changes right away. trying to test impact on memory on mac. BUG=73915 TEST=performance tests Review URL: http://codereview.chromium.org/6598021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76156 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 76154 - Revert 76015 - Added back thread watcher changes byrtenneti@chromium.org2011-02-261-3/+0
| | | | | | | | | | | | | | | | | reverting the revert. will revert the changes right away. trying to test impact on memory on mac. BUG=73915 TEST=performance tests Review URL: http://codereview.chromium.org/6594011 TBR=rtenneti@chromium.org Review URL: http://codereview.chromium.org/6588038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76155 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 76015 - Added back thread watcher changes byrtenneti@chromium.org2011-02-261-0/+3
| | | | | | | | | | | | | | reverting the revert. will revert the changes right away. trying to test impact on memory on mac. BUG=73915 TEST=performance tests Review URL: http://codereview.chromium.org/6594011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76154 0039d316-1c4b-4281-b951-d872f2087c98
* Back out thread watcher changes.rtenneti@chromium.org2011-02-251-3/+0
| | | | | | | | | BUG=73915 TEST=performance tests Review URL: http://codereview.chromium.org/6578033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76015 0039d316-1c4b-4281-b951-d872f2087c98
* First cut at a WATCHDOG thread that monitors threads for theirrtenneti@chromium.org2011-02-231-0/+3
| | | | | | | | | | | | | | responsiveness by sending a ping message to them. Watched Threads respond by sending a pong message to WATCHDOG thread. WACTHDOG thread collects statistics for response time. BUG=71378 TEST=browser_thread_unit_test and thread_watcher_unittest. Starting and stopping of browser. Review URL: http://codereview.chromium.org/6392018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75723 0039d316-1c4b-4281-b951-d872f2087c98
* Move core pieces of chrome\browser. I've only gone up to "g", will do the ↵jam@chromium.org2011-02-221-0/+209
rest in another cl. TBR=avi Review URL: http://codereview.chromium.org/6538100 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75652 0039d316-1c4b-4281-b951-d872f2087c98