0
Commit Graph

32 Commits

Author SHA1 Message Date
marshall@chromium.org
f573ed6b41 Support sharing of ContentMain and BrowserMain code with embedded use cases (try ).
For the browser use case it is convenient to have a single ContentMain entry point function that handles all initialization, run and shutdown. For embedded use cases it is often necessary to integrate with existing application message loops where initialization and shutdown must be handled separately.

To support sharing of this code the following changes were required:

1. Refactor the ContentMain function to create a ContentMainRunner class containing separate initialization, run and shutdown functions.

2. Refactor the BrowserMain function and BrowserMainLoop class to create a BrowserMainRunner class containing separate initialization, run and shutdown functions.

3. Add a new BrowserMainParts::GetMainMessageLoop method. This is necessary to support creation of a custom MessageLoop implementation while sharing BrowserMainRunner initialization and shutdown code.

BUG=112507
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9375017

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121454 0039d316-1c4b-4281-b951-d872f2087c98
2012-02-10 15:58:52 +00:00
marshall@chromium.org
b1b33e512d Revert 121236 - Support sharing of ContentMain and BrowserMain code with embedded use cases (try ).
Tests failing.
Review URL: https://chromiumcodereview.appspot.com/9372027

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121245 0039d316-1c4b-4281-b951-d872f2087c98
2012-02-09 16:48:52 +00:00
marshall@chromium.org
e0a14c0dbf Support sharing of ContentMain and BrowserMain code with embedded use cases (try ).
For the browser use case it is convenient to have a single ContentMain entry point function that handles all initialization, run and shutdown. For embedded use cases it is often necessary to integrate with existing application message loops where initialization and shutdown must be handled separately.

To support sharing of this code the following changes were required:

1. Refactor the ContentMain function to create a ContentMainRunner class containing separate initialization, run and shutdown functions.

2. Refactor the BrowserMain function and BrowserMainLoop class to create a BrowserMainRunner class containing separate initialization, run and shutdown functions.

3. Add a new BrowserMainParts::GetMainMessageLoop method. This is necessary to support creation of a custom MessageLoop implementation while sharing BrowserMainRunner initialization and shutdown code.

BUG=112507
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9347022

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121236 0039d316-1c4b-4281-b951-d872f2087c98
2012-02-09 15:27:22 +00:00
evan@chromium.org
9e49959b0e Revert "Support sharing of ContentMain and BrowserMain code with embedded use cases."
This reverts commit r120574.  Test failures.

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120581 0039d316-1c4b-4281-b951-d872f2087c98
2012-02-06 18:46:35 +00:00
marshall@chromium.org
6f2b39bccf Support sharing of ContentMain and BrowserMain code with embedded use cases.
For the browser use case it is convenient to have a single ContentMain entry point function that handles all initialization, run and shutdown. For embedded use cases it is often necessary to integrate with existing application message loops where initialization and shutdown must be handled separately.

To support sharing of this code the following changes were required:

1. Refactor the ContentMain function to create a ContentMainRunner class containing separate initialization, run and shutdown functions.

2. Refactor the BrowserMain function and BrowserMainLoop class to create a BrowserMainRunner class containing separate initialization, run and shutdown functions.

3. Add a new BrowserMainParts::GetMainMessageLoop method. This is necessary to support creation of a custom MessageLoop implementation while sharing BrowserMainRunner initialization and shutdown code.

BUG=112507
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9190018

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120574 0039d316-1c4b-4281-b951-d872f2087c98
2012-02-06 16:05:13 +00:00
jam@chromium.org
32780605c1 Remove child_process.h includes from chrome (specifically WaitForDebugger). I moved the browser process usage to content. For the NaCl usage, it wasn't working anyways since it wasn't being passed to the process (and if it was, the message box wouldn't work on Windows because of sandbox). When this is needed again, we can figure out a good way of doing it.
BUG=98716
Review URL: http://codereview.chromium.org/8686014

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112259 0039d316-1c4b-4281-b951-d872f2087c98
2011-11-30 18:56:17 +00:00
jam@chromium.org
4573fbd30d Move content_restriction.h and main_function_params.h to content/public/common, and put them in the content namespace.
BUG=98716
Review URL: http://codereview.chromium.org/8387039

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108004 0039d316-1c4b-4281-b951-d872f2087c98
2011-10-31 20:25:18 +00:00
jam@chromium.org
badf5cf5f1 Expose the sandbox related code through the content API. I did a bit of cleanup while I was doing this.
-got rid of SandboxInitWrapper, since I didn't see a need to expose given that we can just expose sandbox::SandboxInterfaceInfo
-got rid of the duplicated code to initialize the broker
-since I made MainFunctionParams only have the sandbox struct on Windows, I also made the mac specific auto release pool behind an ifdef as well. It seemed odd to make something so mac specific compile on all platforms to save some #ifdefs.

BUG=98716
Review URL: http://codereview.chromium.org/8414020

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107863 0039d316-1c4b-4281-b951-d872f2087c98
2011-10-29 03:44:44 +00:00
joi@chromium.org
c38831a108 Split BrowserThread into public API and private implementation, step 1.
Only content/ now has the ability to create BrowserThread objects,
with the exception that tests can create the
content::TestBrowserThread subclass, and (temporarily) code in chrome/
can create the DeprecatedBrowserThread subclass.

A follow-up change will make content/ take care of its own thread
creation, remove DeprecatedBrowserThread, and move all state and
non-trivial constructors from BrowserThread down to BrowserThreadImpl.

Also moved BrowserProcessSubThread into content/ namespace.  As part
of follow-up cleanup, chrome/ will stop using this class.

BUG=98716
TEST=existing

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107718 0039d316-1c4b-4281-b951-d872f2087c98
2011-10-28 12:44:49 +00:00
stevenjb@google.com
b48c918f83 Make GTK and Aura parts orthogonal to OS parts
This CL moves GTK and Aura "Parts" out of the primary BrowserMainParts tree and into orthogonal parts that can be added independently. This was done in a way that will facilitate adding additional parts if (when) we need them.

The motivation for this was to
a) eliminate the existing typedef in chrome_browser_main_chromeos.h
b) reduce the number of #ifdefs required in the setup / parts code

For an outline of the new parts see:

https://docs.google.com/drawings/d/1-gIMl-81c4SvcMrT1xaxnDGibDe7VQfMkFT1bMnIvrg/edit?hl=en_US

Please consider this a proposal; I am entirely open to feedback.

BUG=none
TEST=Chrome compiles and passes tests on all platfroms.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107383 0039d316-1c4b-4281-b951-d872f2087c98
2011-10-26 18:03:30 +00:00
jam@chromium.org
b39ef1cbd6 Move resource_codes to content/public/common.
BUG=98716
Review URL: http://codereview.chromium.org/8382021

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107061 0039d316-1c4b-4281-b951-d872f2087c98
2011-10-25 04:46:55 +00:00
oshima@google.com
4d62853116 rename Run in MessageLoopForUI to RunWithDispatcher
BUG=99471
TEST=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106896 0039d316-1c4b-4281-b951-d872f2087c98
2011-10-24 07:19:51 +00:00
jam@chromium.org
ad50def5e1 Make NotificationService an interface in the content namespace, and switch callers to use it. Move the implementation to content/browser. Stop creating it in all child processes since it's only used in the browser.
BUG=98716
Review URL: http://codereview.chromium.org/8342048

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106403 0039d316-1c4b-4281-b951-d872f2087c98
2011-10-19 23:17:07 +00:00
joi@chromium.org
87f3c08db2 Move content_browser_client.h to public, and while at it, move
window_container_type.h as well since it is included by
content_browser_client.h

BUG=98716
TEST=it builds + existing tests

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106323 0039d316-1c4b-4281-b951-d872f2087c98
2011-10-19 18:07:44 +00:00
jar@chromium.org
84b57956fe Update task tracking to not depend on message_loop_ singleton
I also did a bunch of cleanup, and transitioned to tracking
the duration of a run, rather than the time from posting
(construction of a task) to completion of the run.  It is
less interesting for now to track queueing delay, and we
need a focus on task execution time.  I left in the hook
(API) with the expectation that I'll be extending the
tracked_objects code to include this as well.

I also landed changes to run in Linux/Mac.  The fact that
I've punted on shutdown made this landing easy (all
code support was previously lost during migration to
some flavor of bind support).

r=willchan,jam,viettrungluu,ajwong
BUG=62728
Review URL: http://codereview.chromium.org/8233037

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105694 0039d316-1c4b-4281-b951-d872f2087c98
2011-10-15 23:52:45 +00:00
jam@chromium.org
c08950d205 Move content_switches to content\public\common.
BUG=98716
Review URL: http://codereview.chromium.org/8277018

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105389 0039d316-1c4b-4281-b951-d872f2087c98
2011-10-13 22:20:29 +00:00
willchan@chromium.org
2cb3e6c67a Assert that new renderer processes aren't created during shutdown.
Puts CHECKs in RenderProcessHost's constructor to make sure the main MessageLoop hasn't stopped running yet.

BUG=91398
TEST=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104849 0039d316-1c4b-4281-b951-d872f2087c98
2011-10-11 04:49:32 +00:00
oshima@chromium.org
2768ae4f73 Initialize glib for all linux because all linux variants uses glib.
aura chrome fails on ubuntu 11.04 without this
 remove base::MessagePumpX::DisableGtkMessagePump() from aura as we nolonger has gtk on aura.

BUG=97131
TEST=none


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104508 0039d316-1c4b-4281-b951-d872f2087c98
2011-10-07 17:34:21 +00:00
phajdan.jr@chromium.org
c1f87b2a4f Make an empty content browser test work.
BUG=90448
Review URL: http://codereview.chromium.org/8137012

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104181 0039d316-1c4b-4281-b951-d872f2087c98
2011-10-05 21:59:33 +00:00
mark@chromium.org
f857632728 Restore removed explanatory comment.
BUG=none
TEST=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103573 0039d316-1c4b-4281-b951-d872f2087c98
2011-09-30 23:17:13 +00:00
evan@chromium.org
7d3d128a9d gtk: swallow spurious error
We promote GTK errors into DFATALs.  Some versions of GTK accidentally
call it an error to not have an environment variable set.  They fixed
this on GTK trunk, but we shouldn't die on Ubuntu releases that don't
have the fix.

BUG=97293

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102021 0039d316-1c4b-4281-b951-d872f2087c98
2011-09-20 21:23:01 +00:00
jam@chromium.org
03d8d3e914 Get rid of content::DidEndMainMessageLoop since it was declared in content but defined in chrome, and called by chrome.
Review URL: http://codereview.chromium.org/7948006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101924 0039d316-1c4b-4281-b951-d872f2087c98
2011-09-20 06:07:11 +00:00
oshima@google.com
a91f51922b Initialize message pump not to use gtk.
This is a temp fix to remove gtk_init. We should remove this once we remove gtk from message pump, which should be done as a part of AURA->TOOLKIT_USES_GTK=0

WindowSizer/gfx::screen for aura

BUG=none
TEST=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101922 0039d316-1c4b-4281-b951-d872f2087c98
2011-09-20 05:42:37 +00:00
sky@chromium.org
db021357a0 Revert 101861 - Get rid of content::DidEndMainMessageLoop since it was declared in content but defined in chrome, and called by chrome.
Review URL: http://codereview.chromium.org/7948006

TBR=jam@chromium.org
Review URL: http://codereview.chromium.org/7967008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101872 0039d316-1c4b-4281-b951-d872f2087c98
2011-09-20 00:35:15 +00:00
jam@chromium.org
01fa11e054 Get rid of content::DidEndMainMessageLoop since it was declared in content but defined in chrome, and called by chrome.
Review URL: http://codereview.chromium.org/7948006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101861 0039d316-1c4b-4281-b951-d872f2087c98
2011-09-19 23:13:06 +00:00
saintlou@chromium.org
3fa441d238 Aura under Linux is enabled with:
'use_aura': 1,

BUG=none
TEST=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101704 0039d316-1c4b-4281-b951-d872f2087c98
2011-09-18 17:28:50 +00:00
jam@chromium.org
b0f146ff51 Create a very simple TabContentsView (and not fully implemented yet) and add more supporting code to be able to load a page. Right now it's not rendering, but I suspect it's something small, and the patch has gotten large so I figure it's time to send it for review.
BUG=90445
Review URL: http://codereview.chromium.org/7906008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101395 0039d316-1c4b-4281-b951-d872f2087c98
2011-09-15 22:14:25 +00:00
mdm@chromium.org
30385d7f84 Linux: use our spiffy new DBus client library for KWallet, instead of dbus-glib.
This will also allow us to add unit tests for our KWallet integration.
BUG=90036
Review URL: http://codereview.chromium.org/7835021

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101251 0039d316-1c4b-4281-b951-d872f2087c98
2011-09-15 05:37:08 +00:00
ananta@chromium.org
6f08af8870 Move the V8 benchmarking_extension.cc/.h files out of webkit/extensions into chrome as the functionality
exposed by this extension is chrome specific. The IPCs used by this extension have all been moved to chrome
to a new header file benchmarking_messages.h in chrome\common.

Added a new message filter object in chrome\browser which filters the benchmarking IPCs.

Most of the changes in this CL are centered around ensuring that the benchmarking stuff gets initialized
in the same order as before.

Continuing changes to get rid of the pattern of IPC messags spanning across content and chrome.

BUG=87335
Review URL: http://codereview.chromium.org/7885013

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101214 0039d316-1c4b-4281-b951-d872f2087c98
2011-09-15 01:19:03 +00:00
jam@chromium.org
5629e0c704 Basic scaffolding for a "content shell", i.e. test browser over the content module. Once it's working, this will allow developers working on the core chrome code/web platform/networking etc to test their changes on a much smaller and hence faster to build/run/debug browser.
This doesn't do anything yet because it's blocked on having TabContentsView implementations in content.

BUG=90445
Review URL: http://codereview.chromium.org/7857019

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100778 0039d316-1c4b-4281-b951-d872f2087c98
2011-09-12 22:07:36 +00:00
jam@chromium.org
c1702d71f2 Refactor some more BrowserMain code. Move the small bit of remaining code that's required by all embedders to content.
BUG=90445
Review URL: http://codereview.chromium.org/7840041

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100223 0039d316-1c4b-4281-b951-d872f2087c98
2011-09-08 19:41:43 +00:00
jam@chromium.org
f967b72329 Start moving code from BrowserMain to content, so that it can be reused by all embedders of content. I've based the refactoring on the existing BrowserMainParts. This is the first step; I didn't want to do it all at the same time because it would be too big. Remaining tasks:-rename the browser_main files in chrome to chrome_browser_main-move the OS specific implementations of BrowserMainParts that are needed for content-finish splitting the remaining BrowserMain function (now that's in TemporaryContinue())BUG=90445
Review URL: http://codereview.chromium.org/7779040

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99884 0039d316-1c4b-4281-b951-d872f2087c98
2011-09-07 00:58:04 +00:00