chromeos: Add operations to monitor the screen orientation.
This is intended to help test <http://codereview.chromium.org/7273073/>.
These orientation-only functions will later be replaced with a
generalized sensors API (after appropriate design review). Getting
this pipeline working helps root out bugs and issues in the interim.
BUG=None
TEST=Inject orientation changes via dbus API.
With <http://codereview.chromium.org/7845029/>, inject changes using dbus-send:
dbus-send --system / org.chromium.Sensors.ScreenOrientationChanged int32:1
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=101387
Has known bugs and debug code. Not for submission yet. Just putting this up now ...
9 years, 3 months ago
(2011-09-10 19:37:13 UTC)
#1
Has known bugs and debug code. Not for submission yet. Just putting this up now
so I can feel better ignoring it until Monday (feel free to do likewise).
Took a pass at moving the orientation receiver into the dbus::* API. Am clearly
missing something. It initializes, but neither the connected nor received
callbacks ever fire. bus->Start-like method I'm missing? BrowserThread::IO not
running that early?
Will bug my local folks to help fix --enable-orientation, as it's only getting
passed to the login session.
cwolfe
Getting there. The dbus problem is that BrowserThread::IO is not yet valid, so the message ...
9 years, 3 months ago
(2011-09-12 14:40:41 UTC)
#2
Getting there. The dbus problem is that BrowserThread::IO is not yet valid, so
the message posted by ConnectToSignal is silently dropped. Digging for a fix.
sadrul pointed me to the fix for the enable-orientation flag.
cwolfe
The orientation handler now works in my local tests, so it's PTAL time. +sky: Sorry ...
9 years, 3 months ago
(2011-09-12 19:23:34 UTC)
#3
The orientation handler now works in my local tests, so it's PTAL time.
+sky: Sorry the full design for the sensors is taking so long. Coarse
orientation has become a blocker for other people so I need to quickly add a
simple dbus signal to trigger changes.
satorux1
Looks good in general. Minor comments only: http://codereview.chromium.org/7862020/diff/5001/content/browser/sensors/sensors_source_chromeos.cc File content/browser/sensors/sensors_source_chromeos.cc (right): http://codereview.chromium.org/7862020/diff/5001/content/browser/sensors/sensors_source_chromeos.cc#newcode15 content/browser/sensors/sensors_source_chromeos.cc:15: static const ...
9 years, 3 months ago
(2011-09-12 19:46:38 UTC)
#4
http://codereview.chromium.org/7862020/diff/2002/content/browser/sensors/sensors_source_chromeos.cc File content/browser/sensors/sensors_source_chromeos.cc (right): http://codereview.chromium.org/7862020/diff/2002/content/browser/sensors/sensors_source_chromeos.cc#newcode38 content/browser/sensors/sensors_source_chromeos.cc:38: return true; This always returns true. Is there any ...
9 years, 3 months ago
(2011-09-12 21:21:18 UTC)
#7
9 years, 3 months ago
(2011-09-12 21:55:14 UTC)
#9
http://codereview.chromium.org/7862020/diff/5001/content/browser/sensors/sens...
File content/browser/sensors/sensors_source_chromeos.cc (right):
http://codereview.chromium.org/7862020/diff/5001/content/browser/sensors/sens...
content/browser/sensors/sensors_source_chromeos.cc:16: static const char
kSensorsPath[] = "/";
On 2011/09/12 19:46:38, satorux1 wrote:
> Using "/" as object path is not correct: crosbug.com/20135
>
> I guess the sender object name should be something like /org/chromium/Sensors
>
> Again, if you are in hurry, you can go ahead with a TODO(cwolfe): Fix the
object
> path.
I take it back. You should keep it as "/" for now, if you are in a hurry. Making
it something like /org/chromium/Sensors would make testing with dbus-send
impossible.
Background:
dbus-send sends a signal from "/" and there is no way to change the sender path,
and we have code like this in object_proxy.cc:
// The signal is not coming from the remote object we are attaching to.
if (signal->GetPath() != object_path_)
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
This code seems to be too restrictive. We should probably change the code to
1) not to check the object path
2) make it customizable
I think 1) is simpler and I can do it right now.
cwolfe
Sorry if I clobbered anyone's comments. Had a few utterly broken patch-sets that I rolled ...
9 years, 3 months ago
(2011-09-12 22:15:55 UTC)
#10
Local testing hit a thread restriction error (doing IO on non-IO thread). Assume it's my ...
9 years, 3 months ago
(2011-09-13 17:34:45 UTC)
#11
Local testing hit a thread restriction error (doing IO on non-IO thread). Assume
it's my fault, but am still getting the debugging turned on far enough to trace
it.
satorux1
Where did you hit the error? I think it's a DCHECK failure, and the log ...
9 years, 3 months ago
(2011-09-13 17:40:16 UTC)
#12
Where did you hit the error? I think it's a DCHECK failure, and the log contains
the file name and the line number where it failed.
On 2011/09/13 17:34:45, cwolfe wrote:
> Local testing hit a thread restriction error (doing IO on non-IO thread).
Assume
> it's my fault, but am still getting the debugging turned on far enough to
trace
> it.
cwolfe
jam: Realize you were the content OWNER I drafted for the initial sensors patch. This ...
9 years, 3 months ago
(2011-09-13 20:59:35 UTC)
#13
jam: Realize you were the content OWNER I drafted for the initial sensors patch.
This CL is an incremental growth to let orientation changes arrive over dbus
(ChromeOS with --enable-sensors).
To keep me honest: My intention is still to condense the lessons learned into a
design doc and circulate that for input. Unfortunately I've been slow enough on
that we need an easy way to inject the orientation changes for testing.
Changes in this update:
Moved over to BrowserThread::FILE to avoid restrictions on the kinds of IO we
can perform. Thanks for the pointer satorux.
Switched over to a more generic '--enable-sensors' for consistency with the
namespaces.
<http://codereview.chromium.org/7845029/>, or something like it, would restore
the ability for dbus-send to inject events. My test driver is using the C API,
so works as-is.
Believe it now works as needed. If I've missed anyone's comments please yell at
me :)
jam
any reason that the chromeos file needs to be in content? we've avoided putting chromeos ...
9 years, 3 months ago
(2011-09-13 21:37:52 UTC)
#14
any reason that the chromeos file needs to be in content? we've avoided putting
chromeos files in content, since content by definition is the core code needed
to render a page in a multi-process sandboxed browser. seems that sensor related
code for chromeos doesn't belong there.
cwolfe
No problem moving sensors_source_chromeos.* back to chrome/browser/chromeos. Moved initially to avoid changing the DEPS. Needs ...
9 years, 3 months ago
(2011-09-14 13:42:28 UTC)
#15
No problem moving sensors_source_chromeos.* back to chrome/browser/chromeos.
Moved initially to avoid changing the DEPS.
Needs +dbus, which is currently set only in content/). If you prefer I change
the DEPS, how far down the tree should it be?
On 2011/09/13 21:37:52, John Abd-El-Malek wrote:
> any reason that the chromeos file needs to be in content? we've avoided
putting
> chromeos files in content, since content by definition is the core code needed
> to render a page in a multi-process sandboxed browser. seems that sensor
related
> code for chromeos doesn't belong there.
satorux1
On 2011/09/14 13:42:28, cwolfe wrote: > No problem moving sensors_source_chromeos.* back to chrome/browser/chromeos. > Moved ...
9 years, 3 months ago
(2011-09-14 17:27:53 UTC)
#16
On 2011/09/14 13:42:28, cwolfe wrote:
> No problem moving sensors_source_chromeos.* back to chrome/browser/chromeos.
> Moved initially to avoid changing the DEPS.
>
> Needs +dbus, which is currently set only in content/). If you prefer I change
> the DEPS, how far down the tree should it be?
Let's put it under chrome/browser/chromeos. We can move it up as need.
>
> On 2011/09/13 21:37:52, John Abd-El-Malek wrote:
> > any reason that the chromeos file needs to be in content? we've avoided
> putting
> > chromeos files in content, since content by definition is the core code
needed
> > to render a page in a multi-process sandboxed browser. seems that sensor
> related
> > code for chromeos doesn't belong there.
cwolfe
On 2011/09/14 17:27:53, satorux1 wrote: > On 2011/09/14 13:42:28, cwolfe wrote: > > No problem ...
9 years, 3 months ago
(2011-09-14 17:52:07 UTC)
#17
On 2011/09/14 17:27:53, satorux1 wrote:
> On 2011/09/14 13:42:28, cwolfe wrote:
> > No problem moving sensors_source_chromeos.* back to chrome/browser/chromeos.
> > Moved initially to avoid changing the DEPS.
> >
> > Needs +dbus, which is currently set only in content/). If you prefer I
change
> > the DEPS, how far down the tree should it be?
>
> Let's put it under chrome/browser/chromeos. We can move it up as need.
>
Moved. Quick compile test works; running more complete pass now.
cwolfe
On 2011/09/14 17:52:07, cwolfe wrote: > On 2011/09/14 17:27:53, satorux1 wrote: > > On 2011/09/14 ...
9 years, 3 months ago
(2011-09-14 19:52:12 UTC)
#18
On 2011/09/14 17:52:07, cwolfe wrote:
> On 2011/09/14 17:27:53, satorux1 wrote:
> > On 2011/09/14 13:42:28, cwolfe wrote:
> > > No problem moving sensors_source_chromeos.* back to
chrome/browser/chromeos.
> > > Moved initially to avoid changing the DEPS.
> > >
> > > Needs +dbus, which is currently set only in content/). If you prefer I
> change
> > > the DEPS, how far down the tree should it be?
> >
> > Let's put it under chrome/browser/chromeos. We can move it up as need.
> >
>
> Moved. Quick compile test works; running more complete pass now.
Rolled in a fix from vollick to
chrome/browser/ui/touch/frame/touch_browser_frame_view.cc. That resolves a
freezing problem which was appearing after random combinations of orientation
changes.
Local tests behave, so looks good to me. The trybots blowing up on random and
disjoint sets of tests is not particularly reassuring, but seems about par.
satorux1
LGTM http://codereview.chromium.org/7862020/diff/22001/chrome/browser/chromeos/chrome_browser_main_chromeos.cc File chrome/browser/chromeos/chrome_browser_main_chromeos.cc (right): http://codereview.chromium.org/7862020/diff/22001/chrome/browser/chromeos/chrome_browser_main_chromeos.cc#newcode100 chrome/browser/chromeos/chrome_browser_main_chromeos.cc:100: } I think file-local functions are usually place ...
9 years, 3 months ago
(2011-09-14 20:21:07 UTC)
#19
Moved and compile-tested. derat wanted to pass (e-mail), so over to jam. http://codereview.chromium.org/7862020/diff/22001/chrome/browser/chromeos/chrome_browser_main_chromeos.cc File chrome/browser/chromeos/chrome_browser_main_chromeos.cc ...
9 years, 3 months ago
(2011-09-14 20:41:24 UTC)
#20
sorry for the delay, I didn't know you were still waiting for me. Since this ...
9 years, 3 months ago
(2011-09-15 17:58:41 UTC)
#21
sorry for the delay, I didn't know you were still waiting for me. Since this
doesn't touch content, you don't need an owners approval for any of it. Looks
like satorux has already given a lgtm
cwolfe
jam: No problem, and thanks.
9 years, 3 months ago
(2011-09-15 18:01:18 UTC)
#22
jam: No problem, and thanks.
commit-bot: I haz the power
Can't apply patch for file chrome/browser/chromeos/DEPS. While running patch -p1 --forward --force; patching file chrome/browser/chromeos/DEPS ...
9 years, 3 months ago
(2011-09-15 18:01:47 UTC)
#23
Can't apply patch for file chrome/browser/chromeos/DEPS.
While running patch -p1 --forward --force;
patching file chrome/browser/chromeos/DEPS
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file
chrome/browser/chromeos/DEPS.rej
cwolfe
Nothing suspicious in the rebase; going ahead to CQ. On 2011/09/15 18:01:47, I haz the ...
9 years, 3 months ago
(2011-09-15 18:10:46 UTC)
#24
Nothing suspicious in the rebase; going ahead to CQ.
On 2011/09/15 18:01:47, I haz the power (commit-bot) wrote:
> Can't apply patch for file chrome/browser/chromeos/DEPS.
> While running patch -p1 --forward --force;
> patching file chrome/browser/chromeos/DEPS
> Hunk #1 FAILED at 1.
> 1 out of 1 hunk FAILED -- saving rejects to file
> chrome/browser/chromeos/DEPS.rej
commit-bot: I haz the power
Can't apply patch for file chrome/browser/chromeos/DEPS. While running patch -p1 --forward --force; patching file chrome/browser/chromeos/DEPS ...
9 years, 3 months ago
(2011-09-15 18:11:14 UTC)
#25
Can't apply patch for file chrome/browser/chromeos/DEPS.
While running patch -p1 --forward --force;
patching file chrome/browser/chromeos/DEPS
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file
chrome/browser/chromeos/DEPS.rej
commit-bot: I haz the power
Change committed as 101387
9 years, 3 months ago
(2011-09-15 21:54:15 UTC)
#26
Issue 7862020: chromeos: Add operations to monitor the screen orientation.
(Closed)
Created 9 years, 3 months ago by cwolfe
Modified 9 years, 3 months ago
Reviewers: satorux1, Daniel Erat, jam, commit-bot: I haz the power
Base URL: http://git.chromium.org/git/chromium.git@trunk
Comments: 34