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

Issue 23882007: Explicit initialization of aura::Env for browser shell. (Closed)

Created:
7 years, 3 months ago by dnicoara
Modified:
7 years, 2 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, jochen+watch_chromium.org
Visibility:
Public.

Description

Explicit initialization of aura::Env for browser shell. Most implementations (x11 aura with and without chromeos) do not explicitly call aura::Env::GetInstance() to initialize it. These build work as is because the call is done when performing other operations, such as adding observers. In OZONE there are no such calls, so the OZONE build fails when trying to create a compositor since the Compositor::Initialize hasn't been called. This patch adds an explicit initialization for aura based builds to fix this issue. BUG= Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=227745

Patch Set 1 #

Total comments: 1

Patch Set 2 : Added CreateInstance #

Patch Set 3 : Removed unnecessary call #

Total comments: 5

Patch Set 4 : Moved call to Env::CreateInstance #

Patch Set 5 : Added Env::CreateInstance to fix more unittests #

Patch Set 6 : Sync aura::Env ifdefs with message_loop #

Patch Set 7 : Fix win7_aura and linux #

Patch Set 8 : Do not define Dispatcher on Max #

Patch Set 9 : Do not forward declare CreateDispatcher on Mac #

Patch Set 10 : Do not define Dispatcher on Android #

Patch Set 11 : Using stricter ifdefs #

Total comments: 4

Patch Set 12 : Move Env::CreateInstance to ChromeBrowserMainParts #

Patch Set 13 : Rebased #

Patch Set 14 : aura::Env::CreateInstance on Win for ViewEventTestBase #

Patch Set 15 : Initialize aura in browser extra parts #

Patch Set 16 : Fix chrome_frame_net_tests #

Total comments: 2

Patch Set 17 : Comment why we need to initialize Env in chrome_browser_main #

Patch Set 18 : Rebased and fixed failing linux_chromeos #

Patch Set 19 : Rebased no-op #

Unified diffs Side-by-side diffs Delta from patch set Stats (+66 lines, -12 lines) Patch
M ash/shell.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +5 lines, -4 lines 0 comments Download
M ash/test/ash_test_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 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 2 chunks +10 lines, -0 lines 0 comments Download
M chrome/browser/extensions/test_extension_environment.cc View 1 2 3 4 2 chunks +12 lines, -0 lines 0 comments Download
M chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/base/view_event_test_base.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +7 lines, -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 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_view_aura.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +2 lines, -0 lines 0 comments Download
M content/shell/browser/minimal_shell.cc View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M ui/aura/bench/bench_main.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -1 line 0 comments Download
M ui/aura/demo/demo_main.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
M ui/aura/env.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +6 lines, -2 lines 0 comments Download
M ui/aura/env.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +13 lines, -3 lines 0 comments Download
M ui/aura/test/aura_test_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
M ui/views/bubble/bubble_delegate_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
Ben Goodger (Google)
https://codereview.chromium.org/23882007/diff/1/content/shell/browser/shell_aura.cc File content/shell/browser/shell_aura.cc (right): https://codereview.chromium.org/23882007/diff/1/content/shell/browser/shell_aura.cc#newcode293 content/shell/browser/shell_aura.cc:293: aura::Env::GetInstance(); Perhaps we should have an explicit CreateInstance method ...
7 years, 3 months ago (2013-09-06 17:08:38 UTC) #1
dnicoara
I hope this is close to what you have in mind. Let me know if ...
7 years, 3 months ago (2013-09-10 19:14:59 UTC) #2
Ben Goodger (Google)
https://codereview.chromium.org/23882007/diff/8001/ui/aura/root_window.cc File ui/aura/root_window.cc (right): https://codereview.chromium.org/23882007/diff/8001/ui/aura/root_window.cc#newcode163 ui/aura/root_window.cc:163: Env::CreateInstance(); Why not? Not sure I like this.
7 years, 3 months ago (2013-09-10 19:21:03 UTC) #3
dnicoara
https://codereview.chromium.org/23882007/diff/8001/ui/aura/root_window.cc File ui/aura/root_window.cc (right): https://codereview.chromium.org/23882007/diff/8001/ui/aura/root_window.cc#newcode163 ui/aura/root_window.cc:163: Env::CreateInstance(); On 2013/09/10 19:21:03, Ben Goodger (Google) wrote: > ...
7 years, 3 months ago (2013-09-10 19:56:55 UTC) #4
Ben Goodger (Google)
On 2013/09/10 19:56:55, dnicoara wrote: > https://codereview.chromium.org/23882007/diff/8001/ui/aura/root_window.cc > File ui/aura/root_window.cc (right): > > https://codereview.chromium.org/23882007/diff/8001/ui/aura/root_window.cc#newcode163 > ...
7 years, 3 months ago (2013-09-10 20:38:33 UTC) #5
dnicoara
On 2013/09/10 20:38:33, Ben Goodger (Google) wrote: > On 2013/09/10 19:56:55, dnicoara wrote: > > ...
7 years, 3 months ago (2013-09-10 20:42:25 UTC) #6
Ben Goodger (Google)
On 2013/09/10 20:42:25, dnicoara wrote: > I'm sorry, I didn't express myself correctly. It doesn't ...
7 years, 3 months ago (2013-09-10 20:54:59 UTC) #7
dnicoara
On 2013/09/10 20:54:59, Ben Goodger (Google) wrote: > On 2013/09/10 20:42:25, dnicoara wrote: > > ...
7 years, 3 months ago (2013-09-10 21:03:52 UTC) #8
Ben Goodger (Google)
lgtm
7 years, 3 months ago (2013-09-10 21:04:31 UTC) #9
dnicoara
Ben, could you please take another look at the CL? I had to add a ...
7 years, 3 months ago (2013-09-17 17:53:16 UTC) #10
Ben Goodger (Google)
https://codereview.chromium.org/23882007/diff/48001/ash/shell.cc File ash/shell.cc (right): https://codereview.chromium.org/23882007/diff/48001/ash/shell.cc#newcode233 ash/shell.cc:233: base::MessagePumpX11::Current()->AddDispatcherForRootWindow( is this just the result of a rebase? ...
7 years, 3 months ago (2013-09-17 20:39:03 UTC) #11
dnicoara
https://codereview.chromium.org/23882007/diff/48001/ash/shell.cc File ash/shell.cc (right): https://codereview.chromium.org/23882007/diff/48001/ash/shell.cc#newcode233 ash/shell.cc:233: base::MessagePumpX11::Current()->AddDispatcherForRootWindow( On 2013/09/17 20:39:04, Ben Goodger (Google) wrote: > ...
7 years, 3 months ago (2013-09-17 21:01:27 UTC) #12
Ben Goodger (Google)
> [] ChromeBrowserMainParts::PreMainMessageLoopRunImpl() There's probably already other aura setup stuff here > [] ChromeBrowserMainParts::PreMainMessageLoopRun() .. ...
7 years, 3 months ago (2013-09-17 21:55:15 UTC) #13
dnicoara
Added aura::Env::CreateInstance to FakeExternalTab to fix chrome_frame_net_test on Windows. Your initial suggestion was to use ...
7 years, 2 months ago (2013-10-01 13:56:54 UTC) #14
Ben Goodger (Google)
https://codereview.chromium.org/23882007/diff/92001/chrome/browser/chrome_browser_main.cc File chrome/browser/chrome_browser_main.cc (right): https://codereview.chromium.org/23882007/diff/92001/chrome/browser/chrome_browser_main.cc#newcode1474 chrome/browser/chrome_browser_main.cc:1474: aura::Env::CreateInstance(); If this needs to be in this position ...
7 years, 2 months ago (2013-10-01 23:21:49 UTC) #15
dnicoara
https://codereview.chromium.org/23882007/diff/92001/chrome/browser/chrome_browser_main.cc File chrome/browser/chrome_browser_main.cc (right): https://codereview.chromium.org/23882007/diff/92001/chrome/browser/chrome_browser_main.cc#newcode1474 chrome/browser/chrome_browser_main.cc:1474: aura::Env::CreateInstance(); On 2013/10/01 23:21:49, Ben Goodger (Google) wrote: > ...
7 years, 2 months ago (2013-10-02 18:45:29 UTC) #16
Ben Goodger (Google)
lgtm
7 years, 2 months ago (2013-10-03 18:10:18 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dnicoara@chromium.org/23882007/111001
7 years, 2 months ago (2013-10-04 13:54:46 UTC) #18
commit-bot: I haz the power
Retried try job too often on linux_chromeos for step(s) interactive_ui_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_chromeos&number=161968
7 years, 2 months ago (2013-10-04 14:47:35 UTC) #19
dnicoara
Ben, could you please take another look. I had to rebase and move the Env::CreateInstance ...
7 years, 2 months ago (2013-10-04 23:06:48 UTC) #20
Ben Goodger (Google)
lgtm
7 years, 2 months ago (2013-10-08 23:38:09 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dnicoara@chromium.org/23882007/148001
7 years, 2 months ago (2013-10-09 13:27:43 UTC) #22
commit-bot: I haz the power
7 years, 2 months ago (2013-10-09 16:19:12 UTC) #23
Message was sent while issue was closed.
Change committed as 227745

Powered by Google App Engine
This is Rietveld 408576698