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

Issue 9190018: Support sharing of ContentMain and BrowserMain code with embedded use cases. (Closed)

Created:
8 years, 11 months ago by Marshall
Modified:
8 years, 10 months ago
Reviewers:
jam, Adam Simmons
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, dpranke-watch+content_chromium.org
Visibility:
Public.

Description

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 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=120574

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 7

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Patch Set 9 : '' #

Patch Set 10 : '' #

Patch Set 11 : '' #

Patch Set 12 : '' #

Patch Set 13 : '' #

Total comments: 4

Patch Set 14 : '' #

Total comments: 6

Patch Set 15 : '' #

Patch Set 16 : '' #

Total comments: 2

Patch Set 17 : '' #

Patch Set 18 : '' #

Patch Set 19 : '' #

Patch Set 20 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+487 lines, -795 lines) Patch
M chrome/app/chrome_main.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -1 line 0 comments Download
M chrome/app/chrome_main_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +1 line, -4 lines 0 comments Download
M chrome/browser/chrome_browser_main.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chrome_browser_main.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/test/base/chrome_test_launcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -1 line 0 comments Download
M chrome_frame/test/net/fake_external_tab.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -0 lines 0 comments Download
M chrome_frame/test/net/fake_external_tab.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +5 lines, -1 line 0 comments Download
D content/app/content_main.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +0 lines, -43 lines 0 comments Download
M content/app/content_main.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +11 lines, -441 lines 0 comments Download
A + content/app/content_main_runner.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +218 lines, -131 lines 0 comments Download
M content/browser/browser_main.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +10 lines, -87 lines 0 comments Download
M content/browser/browser_main_loop.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +12 lines, -6 lines 0 comments Download
M content/browser/browser_main_loop.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 4 chunks +8 lines, -9 lines 0 comments Download
A + content/browser/browser_main_runner.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +91 lines, -58 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +3 lines, -1 line 0 comments Download
M content/content_app.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +4 lines, -2 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +2 lines, -0 lines 0 comments Download
A + content/public/app/content_main.h View 1 2 3 2 chunks +4 lines, -4 lines 0 comments Download
M content/public/app/content_main_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +2 lines, -2 lines 0 comments Download
A content/public/app/content_main_runner.h View 1 2 3 4 1 chunk +57 lines, -0 lines 0 comments Download
M content/public/browser/browser_main_parts.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +6 lines, -0 lines 0 comments Download
A content/public/browser/browser_main_runner.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +37 lines, -0 lines 0 comments Download
M content/shell/shell_browser_main.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +2 lines, -1 line 0 comments Download
M content/shell/shell_browser_main.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +4 lines, -0 lines 0 comments Download
M content/shell/shell_main.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -1 line 0 comments Download
M content/shell/shell_main_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +0 lines, -1 line 0 comments Download
M content/test/content_test_launcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 26 (0 generated)
Marshall
Hi John, This is a preliminary patch to implement the functionality that we discussed in ...
8 years, 11 months ago (2012-01-11 21:04:06 UTC) #1
jam
CCing Adam to get his feedback, i.e. just to make sure that this solves both ...
8 years, 11 months ago (2012-01-12 18:07:18 UTC) #2
Marshall
Thanks for the review. Please see my comments inline. I'll update the patch shortly. On ...
8 years, 11 months ago (2012-01-12 18:41:57 UTC) #3
Marshall
Please review this updated patch set that includes all of the requested changes. The embedded ...
8 years, 11 months ago (2012-01-12 23:03:12 UTC) #4
Adam Simmons
This looks awesome, no critiques here; great job Marshall. @ John: we also need to ...
8 years, 11 months ago (2012-01-13 05:32:49 UTC) #5
jam
(small note: in the future, it's slightly better if you can reply to each point ...
8 years, 11 months ago (2012-01-13 20:42:10 UTC) #6
Marshall
On 2012/01/13 20:42:10, John Abd-El-Malek wrote: > (small note: in the future, it's slightly better ...
8 years, 11 months ago (2012-01-13 22:37:09 UTC) #7
jam
On 2012/01/13 22:37:09, Marshall wrote: > On 2012/01/13 20:42:10, John Abd-El-Malek wrote: > > (small ...
8 years, 11 months ago (2012-01-13 23:08:44 UTC) #8
jam
btw are you still pursuing this change?
8 years, 11 months ago (2012-01-24 22:40:39 UTC) #9
Marshall
On 2012/01/24 22:40:39, John Abd-El-Malek wrote: > btw are you still pursuing this change? I'm ...
8 years, 11 months ago (2012-01-24 22:49:51 UTC) #10
jam
On Tue, Jan 24, 2012 at 2:49 PM, <marshall@chromium.org> wrote: > On 2012/01/24 22:40:39, John ...
8 years, 11 months ago (2012-01-24 22:55:35 UTC) #11
Marshall
On 2012/01/24 22:55:35, John Abd-El-Malek wrote: > If you can write a test, that'd be ...
8 years, 11 months ago (2012-01-24 23:18:15 UTC) #12
Marshall
Hi John, Can you give this a final review before I commit? Are there any ...
8 years, 10 months ago (2012-01-31 19:07:16 UTC) #13
jam
http://codereview.chromium.org/9190018/diff/41010/content/app/content_main_runner.cc File content/app/content_main_runner.cc (right): http://codereview.chromium.org/9190018/diff/41010/content/app/content_main_runner.cc#newcode288 content/app/content_main_runner.cc:288: ContentMainRunnerImpl(); since this class is only in the cc ...
8 years, 10 months ago (2012-01-31 21:11:28 UTC) #14
Marshall
On 2012/01/31 21:11:28, John Abd-El-Malek wrote: > http://codereview.chromium.org/9190018/diff/41010/content/app/content_main_runner.cc > File content/app/content_main_runner.cc (right): > > http://codereview.chromium.org/9190018/diff/41010/content/app/content_main_runner.cc#newcode288 ...
8 years, 10 months ago (2012-02-01 16:22:32 UTC) #15
jam
On 2012/02/01 16:22:32, Marshall wrote: > On 2012/01/31 21:11:28, John Abd-El-Malek wrote: > > > ...
8 years, 10 months ago (2012-02-01 17:19:32 UTC) #16
jam
On 2012/02/01 17:19:32, John Abd-El-Malek wrote: > On 2012/02/01 16:22:32, Marshall wrote: > > On ...
8 years, 10 months ago (2012-02-01 17:21:13 UTC) #17
jam
http://codereview.chromium.org/9190018/diff/48001/content/app/content_main_runner.cc File content/app/content_main_runner.cc (right): http://codereview.chromium.org/9190018/diff/48001/content/app/content_main_runner.cc#newcode317 content/app/content_main_runner.cc:317: #else // !OS_WIN nit only two spaces before // ...
8 years, 10 months ago (2012-02-01 17:28:39 UTC) #18
Marshall
All changes done as requested. I think I even replied correctly this time :-). http://codereview.chromium.org/9190018/diff/48001/content/app/content_main_runner.cc ...
8 years, 10 months ago (2012-02-01 19:37:13 UTC) #19
Marshall
On 2012/02/01 17:19:32, John Abd-El-Malek wrote: > On 2012/02/01 16:22:32, Marshall wrote: > > All ...
8 years, 10 months ago (2012-02-02 19:58:57 UTC) #20
jam
lgtm, thanks for following this through, this change is in high demand by many groups ...
8 years, 10 months ago (2012-02-02 21:43:35 UTC) #21
Marshall
http://codereview.chromium.org/9190018/diff/52001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): http://codereview.chromium.org/9190018/diff/52001/content/browser/renderer_host/render_process_host_impl.cc#newcode318 content/browser/renderer_host/render_process_host_impl.cc:318: extern bool g_exited_main_message_loop; On 2012/02/02 21:43:36, John Abd-El-Malek wrote: ...
8 years, 10 months ago (2012-02-02 22:02:10 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/marshall@chromium.org/9190018/43048
8 years, 10 months ago (2012-02-02 22:02:37 UTC) #23
commit-bot: I haz the power
Can't apply patch for file content/app/content_main_runner.cc. While running patch -p0 --forward --force; patching file content/app/content_main_runner.cc ...
8 years, 10 months ago (2012-02-02 22:02:44 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/marshall@chromium.org/9190018/43092
8 years, 10 months ago (2012-02-03 15:30:16 UTC) #25
commit-bot: I haz the power
8 years, 10 months ago (2012-02-03 15:30:23 UTC) #26
Can't apply patch for file content/app/content_main_runner.cc.
While running patch -p0 --forward --force;
patching file content/app/content_main_runner.cc
Hunk #1 FAILED at 2.
Hunk #2 FAILED at 27.
Hunk #3 FAILED at 41.
Hunk #4 FAILED at 75.
Hunk #5 FAILED at 260.
Hunk #6 FAILED at 279.
6 out of 6 hunks FAILED -- saving rejects to file
content/app/content_main_runner.cc.rej

Powered by Google App Engine
This is Rietveld 408576698