Looking good. Thanks for the tests and comments, much clearer to me now :D https://codereview.chromium.org/2636303002/diff/160001/chromecast/graphics/BUILD.gn ...
3 years, 11 months ago
(2017-01-24 00:54:46 UTC)
#8
3 years, 11 months ago
(2017-01-24 04:10:12 UTC)
#12
lgtm :)
https://codereview.chromium.org/2636303002/diff/160001/chromecast/graphics/ca...
File chromecast/graphics/cast_window_manager_aura_test.cc (right):
https://codereview.chromium.org/2636303002/diff/160001/chromecast/graphics/ca...
chromecast/graphics/cast_window_manager_aura_test.cc:29: window->Show();
On 2017/01/24 03:39:50, Joshua LeVasseur wrote:
> On 2017/01/24 00:54:46, halliwell wrote:
> > What's this test checking? :)
>
> I'd like to check that it displays the window, but I don't know how to do that
> yet. Right now I just want to ensure that we can build and compile and run
the
> basics of our windowing system in the unit tests.
Fair enough. Maybe can find some useful assertions to make in other aura tests?
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
3 years, 11 months ago
(2017-01-24 05:13:29 UTC)
#13
3 years, 11 months ago
(2017-01-24 21:41:18 UTC)
#17
On 2017/01/24 04:10:12, halliwell wrote:
> lgtm :)
>
>
https://codereview.chromium.org/2636303002/diff/160001/chromecast/graphics/ca...
> File chromecast/graphics/cast_window_manager_aura_test.cc (right):
>
>
https://codereview.chromium.org/2636303002/diff/160001/chromecast/graphics/ca...
> chromecast/graphics/cast_window_manager_aura_test.cc:29: window->Show();
> On 2017/01/24 03:39:50, Joshua LeVasseur wrote:
> > On 2017/01/24 00:54:46, halliwell wrote:
> > > What's this test checking? :)
> >
> > I'd like to check that it displays the window, but I don't know how to do
that
> > yet. Right now I just want to ensure that we can build and compile and run
> the
> > basics of our windowing system in the unit tests.
>
> Fair enough. Maybe can find some useful assertions to make in other aura
tests?
I've implemented better tests, and realized that I didn't completely ignore
input events on release builds, so added code to definitely drop events for
release builds (with a test for this too).
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
3 years, 11 months ago
(2017-01-24 23:06:17 UTC)
#18
3 years, 11 months ago
(2017-01-24 23:06:18 UTC)
#19
Dry run: This issue passed the CQ dry run.
Joshua LeVasseur
Description was changed from ========== [Chromecast] Add support for z-order and window focus. BUG=internal b/33046596, ...
3 years, 11 months ago
(2017-01-25 18:37:52 UTC)
#20
Description was changed from
==========
[Chromecast] Add support for z-order and window focus.
BUG=internal b/33046596, internal b/33047358, internal b/34103918
TEST=keyboard input should work in a window with google.com
Change-Id: I01d9ae64d3175298d439577e4c83bea4ada6203f
==========
to
==========
[Chromecast] Add support for z-order and window focus.
BUG=internal b/33046596, internal b/33047358, internal b/34103918
TEST=keyboard input should work in a window with google.com
Change-Id: I01d9ae64d3175298d439577e4c83bea4ada6203f
==========
3 years, 11 months ago
(2017-01-26 02:51:01 UTC)
#24
https://codereview.chromium.org/2636303002/diff/200001/chromecast/graphics/ca...
File chromecast/graphics/cast_focus_client_aura.cc (right):
https://codereview.chromium.org/2636303002/diff/200001/chromecast/graphics/ca...
chromecast/graphics/cast_focus_client_aura.cc:58: LOG(INFO) << "Removing window,
" << LOG_WINDOW_INFO(top_level, window);
On 2017/01/26 01:50:10, sadrul wrote:
> Should these be DLOG?
Done.
https://codereview.chromium.org/2636303002/diff/200001/chromecast/graphics/ca...
chromecast/graphics/cast_focus_client_aura.cc:215: return window;
On 2017/01/26 01:50:10, sadrul wrote:
> Can you just use window->GetRootWindow(), instead of using
GetTopLevelWindow()?
> The only difference is that GetRootWindow() can return null if it's not
attached
> to a host, but from the uses of GetTopLevelWindow(), it doesn't look like that
> would be a problem.
I want to get a child window of the root window (where the root window is the
one with the host). The child windows will have different IDs specifying their
z-order. I've updated the comment to try to separate this from the root window.
https://codereview.chromium.org/2636303002/diff/200001/chromecast/graphics/ca...
File chromecast/graphics/cast_window_manager_aura.cc (right):
https://codereview.chromium.org/2636303002/diff/200001/chromecast/graphics/ca...
chromecast/graphics/cast_window_manager_aura.cc:209: for (auto&& other :
windows) {
On 2017/01/26 01:50:10, sadrul wrote:
> auto* other : windows
Done.
https://codereview.chromium.org/2636303002/diff/200001/chromecast/graphics/ca...
chromecast/graphics/cast_window_manager_aura.cc:216: (!above || other->id() <
above->id())) {
On 2017/01/26 01:50:10, sadrul wrote:
> Where in the code do you assign the window ids? I assume you want to use
> CastWindowManager::WindowId, but I couldn't find where it's set from a quick
> look.
>
> Note that aura only sets the default id to all windows during creation, and it
> is upto the client to explicitly set a different id (if desired). So unless
some
> code in chromecast is setting the id, this wouldn't work very well.
Some future code changes, which will bring in additional windows, will assign
the IDs. I've tried to make the code handle the default ID gracefully, so that
it isn't necessary to assign an ID for the bottom-most (default position)
windows. If an overlay is desired, then the ID will be necessary. If the
aura::Window::kInitialId ever changes, then things will stop working, so I've
added another unit test that ensures that the BOTTOM window ID always matches
the default aura::Window::kInitialId. Note that cast_window_manager.h, which
declares the window IDs, can't have a dependency on ui/aura/window.h, because
cast_window_manager.h can be used in code that doesn't use Aura (e.g., Android).
But the Aura-based code is the only code concerned with z-order at the moment.
https://codereview.chromium.org/2636303002/diff/200001/chromecast/graphics/ca...
File chromecast/graphics/cast_window_manager_aura_test.cc (right):
https://codereview.chromium.org/2636303002/diff/200001/chromecast/graphics/ca...
chromecast/graphics/cast_window_manager_aura_test.cc:66:
base::RunLoop().RunUntilIdle();
On 2017/01/26 01:50:10, sadrul wrote:
> Do you need to spin the message-loop here?
The event-dispatch logic posts tasks, so this is necessary (as far as I can
tell). If I remove it, the unit test will fail with tasks left over on the run
queue.
https://codereview.chromium.org/2636303002/diff/200001/chromecast/graphics/ca...
chromecast/graphics/cast_window_manager_aura_test.cc:102:
base::RunLoop().RunUntilIdle();
On 2017/01/26 01:50:10, sadrul wrote:
> ditto
Acknowledged.
Joshua LeVasseur
The CQ bit was checked by jlevasseur@chromium.org to run a CQ dry run
3 years, 11 months ago
(2017-01-26 18:42:44 UTC)
#25
3 years, 11 months ago
(2017-01-26 20:39:45 UTC)
#28
Dry run: This issue passed the CQ dry run.
sadrul
A couple of suggestions. lgtm https://codereview.chromium.org/2636303002/diff/200001/chromecast/graphics/cast_focus_client_aura.cc File chromecast/graphics/cast_focus_client_aura.cc (right): https://codereview.chromium.org/2636303002/diff/200001/chromecast/graphics/cast_focus_client_aura.cc#newcode215 chromecast/graphics/cast_focus_client_aura.cc:215: return window; On 2017/01/26 ...
3 years, 11 months ago
(2017-01-27 00:30:57 UTC)
#29
A couple of suggestions. lgtm
https://codereview.chromium.org/2636303002/diff/200001/chromecast/graphics/ca...
File chromecast/graphics/cast_focus_client_aura.cc (right):
https://codereview.chromium.org/2636303002/diff/200001/chromecast/graphics/ca...
chromecast/graphics/cast_focus_client_aura.cc:215: return window;
On 2017/01/26 02:51:00, Joshua LeVasseur wrote:
> On 2017/01/26 01:50:10, sadrul wrote:
> > Can you just use window->GetRootWindow(), instead of using
> GetTopLevelWindow()?
> > The only difference is that GetRootWindow() can return null if it's not
> attached
> > to a host, but from the uses of GetTopLevelWindow(), it doesn't look like
that
> > would be a problem.
>
> I want to get a child window of the root window (where the root window is the
> one with the host). The child windows will have different IDs specifying
their
> z-order. I've updated the comment to try to separate this from the root
window.
OK. Note that there is also Window::GetToplevelWindow(), although not sure if
that will work for you (it returns the higher-most ancestor with a non-null
delegate).
https://codereview.chromium.org/2636303002/diff/200001/chromecast/graphics/ca...
File chromecast/graphics/cast_window_manager_aura_test.cc (right):
https://codereview.chromium.org/2636303002/diff/200001/chromecast/graphics/ca...
chromecast/graphics/cast_window_manager_aura_test.cc:66:
base::RunLoop().RunUntilIdle();
On 2017/01/26 02:51:01, Joshua LeVasseur wrote:
> On 2017/01/26 01:50:10, sadrul wrote:
> > Do you need to spin the message-loop here?
>
> The event-dispatch logic posts tasks, so this is necessary (as far as I can
> tell). If I remove it, the unit test will fail with tasks left over on the
run
> queue.
Ohh, you are using UIControlsAura. That's why.
Please switch to use ui::test::EventGenerator[1] instead. That is much simpler,
and does not need to cycle message-loop.
1:
https://cs.chromium.org/chromium/src/ui/events/test/event_generator.h?sq=pack...
jbauman
ui/gl/test DEPS lgtm.
3 years, 10 months ago
(2017-01-27 00:43:32 UTC)
#30
ui/gl/test DEPS lgtm.
Joshua LeVasseur
The CQ bit was checked by jlevasseur@chromium.org to run a CQ dry run
3 years, 10 months ago
(2017-01-27 04:50:28 UTC)
#31
https://codereview.chromium.org/2636303002/diff/200001/chromecast/graphics/cast_focus_client_aura.cc File chromecast/graphics/cast_focus_client_aura.cc (right): https://codereview.chromium.org/2636303002/diff/200001/chromecast/graphics/cast_focus_client_aura.cc#newcode215 chromecast/graphics/cast_focus_client_aura.cc:215: return window; On 2017/01/27 00:30:56, sadrul wrote: > On ...
3 years, 10 months ago
(2017-01-27 04:53:44 UTC)
#33
https://codereview.chromium.org/2636303002/diff/200001/chromecast/graphics/ca...
File chromecast/graphics/cast_focus_client_aura.cc (right):
https://codereview.chromium.org/2636303002/diff/200001/chromecast/graphics/ca...
chromecast/graphics/cast_focus_client_aura.cc:215: return window;
On 2017/01/27 00:30:56, sadrul wrote:
> On 2017/01/26 02:51:00, Joshua LeVasseur wrote:
> > On 2017/01/26 01:50:10, sadrul wrote:
> > > Can you just use window->GetRootWindow(), instead of using
> > GetTopLevelWindow()?
> > > The only difference is that GetRootWindow() can return null if it's not
> > attached
> > > to a host, but from the uses of GetTopLevelWindow(), it doesn't look like
> that
> > > would be a problem.
> >
> > I want to get a child window of the root window (where the root window is
the
> > one with the host). The child windows will have different IDs specifying
> their
> > z-order. I've updated the comment to try to separate this from the root
> window.
>
> OK. Note that there is also Window::GetToplevelWindow(), although not sure if
> that will work for you (it returns the higher-most ancestor with a non-null
> delegate).
To avoid conflict with existing names, I've renamed it to GetZOrderWindow()
https://codereview.chromium.org/2636303002/diff/200001/chromecast/graphics/ca...
File chromecast/graphics/cast_window_manager_aura_test.cc (right):
https://codereview.chromium.org/2636303002/diff/200001/chromecast/graphics/ca...
chromecast/graphics/cast_window_manager_aura_test.cc:66:
base::RunLoop().RunUntilIdle();
On 2017/01/27 00:30:56, sadrul wrote:
> On 2017/01/26 02:51:01, Joshua LeVasseur wrote:
> > On 2017/01/26 01:50:10, sadrul wrote:
> > > Do you need to spin the message-loop here?
> >
> > The event-dispatch logic posts tasks, so this is necessary (as far as I can
> > tell). If I remove it, the unit test will fail with tasks left over on the
> run
> > queue.
>
> Ohh, you are using UIControlsAura. That's why.
>
> Please switch to use ui::test::EventGenerator[1] instead. That is much
simpler,
> and does not need to cycle message-loop.
>
> 1:
>
https://cs.chromium.org/chromium/src/ui/events/test/event_generator.h?sq=pack...
Thanks! Done.
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
3 years, 10 months ago
(2017-01-27 05:56:41 UTC)
#34
CQ is committing da patch. Bot data: {"patchset_id": 260001, "attempt_start_ts": 1485793183737790, "parent_rev": "ceb64f73f7bf1e1ae1914970c9adc455f564a1e9", "commit_rev": "ff442c09047c888651b3b43a8e8d4955092d33ea"}
3 years, 10 months ago
(2017-01-30 17:19:48 UTC)
#39
CQ is committing da patch.
Bot data: {"patchset_id": 260001, "attempt_start_ts": 1485793183737790,
"parent_rev": "ceb64f73f7bf1e1ae1914970c9adc455f564a1e9", "commit_rev":
"ff442c09047c888651b3b43a8e8d4955092d33ea"}
commit-bot: I haz the power
Description was changed from ========== [Chromecast] Add support for z-order and window focus. BUG=internal b/33046596, ...
3 years, 10 months ago
(2017-01-30 17:20:20 UTC)
#40
Message was sent while issue was closed.
Description was changed from
==========
[Chromecast] Add support for z-order and window focus.
BUG=internal b/33046596, internal b/33047358, internal b/34103918
TEST=keyboard input should work in a window with google.com
Change-Id: I01d9ae64d3175298d439577e4c83bea4ada6203f
==========
to
==========
[Chromecast] Add support for z-order and window focus.
BUG=internal b/33046596, internal b/33047358, internal b/34103918
TEST=keyboard input should work in a window with google.com
Change-Id: I01d9ae64d3175298d439577e4c83bea4ada6203f
Review-Url: https://codereview.chromium.org/2636303002
Cr-Commit-Position: refs/heads/master@{#447006}
Committed:
https://chromium.googlesource.com/chromium/src/+/ff442c09047c888651b3b43a8e8d...
==========
commit-bot: I haz the power
Committed patchset #14 (id:260001) as https://chromium.googlesource.com/chromium/src/+/ff442c09047c888651b3b43a8e8d4955092d33ea
3 years, 10 months ago
(2017-01-30 17:20:22 UTC)
#41
Issue 2636303002: [Chromecast] Add support for z-order and window focus.
(Closed)
Created 3 years, 11 months ago by Joshua LeVasseur
Modified 3 years, 10 months ago
Reviewers: halliwell, derekjchow1, sadrul, jbauman
Base URL:
Comments: 55