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

Issue 7453003: Change Chromoting client to use Pepper's new Resource-base InputEvents. (Closed)

Created:
9 years, 5 months ago by garykac
Modified:
9 years, 5 months ago
Reviewers:
dmac, simonmorris, Wez
CC:
chromium-reviews, jamiewalch+watch_chromium.org, hclam+watch_chromium.org, simonmorris+watch_chromium.org, wez+watch_chromium.org, dmaclach+watch_chromium.org, garykac+watch_chromium.org, lambroslambrou+watch_chromium.org, ajwong+watch_chromium.org, sergeyu+watch_chromium.org
Visibility:
Public.

Description

Change Chromoting client to use Pepper's new Resource-base InputEvents. Remove gfx::Point and gfx::Rect from the Chromoting client plugin code and consistently use pp::Point and pp::Rect. Push ConvertScreenToHost down into PepperView so it can take and return a pp::Point. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=93462

Patch Set 1 #

Patch Set 2 : aaa #

Patch Set 3 : use PepperViewProxy #

Patch Set 4 : cleanup #

Total comments: 23

Patch Set 5 : review + make PepperInputHandler take a PepperViewProxy #

Patch Set 6 : merge #

Patch Set 7 : tweaks #

Unified diffs Side-by-side diffs Delta from patch set Stats (+83 lines, -64 lines) Patch
M remoting/client/chromoting_view.h View 1 2 3 1 chunk +0 lines, -4 lines 0 comments Download
M remoting/client/plugin/chromoting_instance.cc View 1 2 3 4 5 6 2 chunks +13 lines, -8 lines 0 comments Download
M remoting/client/plugin/pepper_input_handler.h View 1 2 3 4 5 3 chunks +10 lines, -4 lines 0 comments Download
M remoting/client/plugin/pepper_input_handler.cc View 1 2 3 4 5 3 chunks +26 lines, -19 lines 0 comments Download
M remoting/client/plugin/pepper_view.h View 1 2 3 4 chunks +8 lines, -4 lines 0 comments Download
M remoting/client/plugin/pepper_view.cc View 2 8 chunks +20 lines, -20 lines 0 comments Download
M remoting/client/plugin/pepper_view_proxy.h View 2 chunks +4 lines, -3 lines 0 comments Download
M remoting/client/plugin/pepper_view_proxy.cc View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
garykac
9 years, 5 months ago (2011-07-19 23:39:50 UTC) #1
dmac
http://codereview.chromium.org/7453003/diff/4001/remoting/client/plugin/chromoting_instance.cc File remoting/client/plugin/chromoting_instance.cc (right): http://codereview.chromium.org/7453003/diff/4001/remoting/client/plugin/chromoting_instance.cc#newcode205 remoting/client/plugin/chromoting_instance.cc:205: (event.GetType()==PP_INPUTEVENT_TYPE_KEYDOWN ? "DOWN" : "UP"), space between ) and ...
9 years, 5 months ago (2011-07-20 00:34:31 UTC) #2
Wez
http://codereview.chromium.org/7453003/diff/4001/remoting/client/chromoting_view.h File remoting/client/chromoting_view.h (left): http://codereview.chromium.org/7453003/diff/4001/remoting/client/chromoting_view.h#oldcode78 remoting/client/chromoting_view.h:78: virtual gfx::Point ConvertScreenToHost(const gfx::Point& p) const = 0; Isn't ...
9 years, 5 months ago (2011-07-20 00:58:35 UTC) #3
garykac
http://codereview.chromium.org/7453003/diff/4001/remoting/client/chromoting_view.h File remoting/client/chromoting_view.h (left): http://codereview.chromium.org/7453003/diff/4001/remoting/client/chromoting_view.h#oldcode78 remoting/client/chromoting_view.h:78: virtual gfx::Point ConvertScreenToHost(const gfx::Point& p) const = 0; On ...
9 years, 5 months ago (2011-07-20 18:55:27 UTC) #4
simonmorris
http://codereview.chromium.org/7453003/diff/4001/remoting/client/plugin/pepper_view.h File remoting/client/plugin/pepper_view.h (right): http://codereview.chromium.org/7453003/diff/4001/remoting/client/plugin/pepper_view.h#newcode59 remoting/client/plugin/pepper_view.h:59: // screen. On 2011/07/20 18:55:28, garykac wrote: > On ...
9 years, 5 months ago (2011-07-20 19:12:32 UTC) #5
Wez
9 years, 5 months ago (2011-07-20 22:36:29 UTC) #6
On 2011/07/20 18:55:27, garykac wrote:
>
http://codereview.chromium.org/7453003/diff/4001/remoting/client/chromoting_v...
> File remoting/client/chromoting_view.h (left):
> 
>
http://codereview.chromium.org/7453003/diff/4001/remoting/client/chromoting_v...
> remoting/client/chromoting_view.h:78: virtual gfx::Point
> ConvertScreenToHost(const gfx::Point& p) const = 0;
> On 2011/07/20 00:58:35, Wez wrote:
> > Isn't this view-to-host coordinate conversion, rather than screen-to-host?
> 
> I think so, but the term screen is used through the view code: ScreenToHost,
> HostToScreen, screen_x_to_host_x_, ...
> 
> Any renaming should be a separate cl.
> 
>
http://codereview.chromium.org/7453003/diff/4001/remoting/client/plugin/chrom...
> File remoting/client/plugin/chromoting_instance.cc (right):
> 
>
http://codereview.chromium.org/7453003/diff/4001/remoting/client/plugin/chrom...
> remoting/client/plugin/chromoting_instance.cc:205:
> (event.GetType()==PP_INPUTEVENT_TYPE_KEYDOWN ? "DOWN" : "UP"),
> On 2011/07/20 00:34:31, dmac wrote:
> > space between ) and ==
> 
> Done.
> 
>
http://codereview.chromium.org/7453003/diff/4001/remoting/client/plugin/chrom...
> remoting/client/plugin/chromoting_instance.cc:207:
> pih->HandleKeyEvent(event.GetType() == PP_INPUTEVENT_TYPE_KEYDOWN, key);
> On 2011/07/20 00:58:35, Wez wrote:
> > nit: Why use event.GetType() == foo here, but not for MOUSEDOWN/MOUSEUP?
> 
> made consistent
> 
>
http://codereview.chromium.org/7453003/diff/4001/remoting/client/plugin/chrom...
> File remoting/client/plugin/chromoting_instance.h (right):
> 
>
http://codereview.chromium.org/7453003/diff/4001/remoting/client/plugin/chrom...
> remoting/client/plugin/chromoting_instance.h:32: class Module;
> On 2011/07/20 00:58:35, Wez wrote:
> > Need to forward-define InputEvent here, too.
> 
> Done.
> 
>
http://codereview.chromium.org/7453003/diff/4001/remoting/client/plugin/peppe...
> File remoting/client/plugin/pepper_input_handler.cc (right):
> 
>
http://codereview.chromium.org/7453003/diff/4001/remoting/client/plugin/peppe...
> remoting/client/plugin/pepper_input_handler.cc:43: pp::Point p =
> pepper_view->ConvertScreenToHost(event.GetMousePosition());
> On 2011/07/20 00:58:35, Wez wrote:
> > ConvertScreenToHost accepts & returns a gfx::Point, not a pp::Point, doesn't
> it?
> 
> err.. not any more.
> 
>
http://codereview.chromium.org/7453003/diff/4001/remoting/client/plugin/peppe...
> remoting/client/plugin/pepper_input_handler.cc:51: if (event.GetMouseButton()
==
> PP_INPUTEVENT_MOUSEBUTTON_LEFT) {
> On 2011/07/20 00:34:31, dmac wrote:
> > Would a switch on event.GetMouseButton() be more readable and give us a
> compile
> > time check to make sure we hit all the cases if more are added later?
> 
> Done.
> 
>
http://codereview.chromium.org/7453003/diff/4001/remoting/client/plugin/peppe...
> remoting/client/plugin/pepper_input_handler.cc:51: if (event.GetMouseButton()
==
> PP_INPUTEVENT_MOUSEBUTTON_LEFT) {
> On 2011/07/20 00:58:35, Wez wrote:
> > On 2011/07/20 00:34:31, dmac wrote:
> > > Would a switch on event.GetMouseButton() be more readable and give us a
> > compile
> > > time check to make sure we hit all the cases if more are added later?
> > 
> > Although we still need to cope with cases we don't recognize, so we don't
> break
> > if Pepper gets extended.
> 
> word
> 
>
http://codereview.chromium.org/7453003/diff/4001/remoting/client/plugin/peppe...
> File remoting/client/plugin/pepper_view.cc (right):
> 
>
http://codereview.chromium.org/7453003/diff/4001/remoting/client/plugin/peppe...
> remoting/client/plugin/pepper_view.cc:133: pp::Rect r_scaled =
> UpdateScaledBackingStore(
> On 2011/07/20 00:34:31, dmac wrote:
> > is there really no gfx::Rect to pp:Rect conversion routine?
> 
> Nope. The old code did a conversion like this as well.
> 
>
http://codereview.chromium.org/7453003/diff/4001/remoting/client/plugin/peppe...
> File remoting/client/plugin/pepper_view.h (right):
> 
>
http://codereview.chromium.org/7453003/diff/4001/remoting/client/plugin/peppe...
> remoting/client/plugin/pepper_view.h:59: // screen.
> On 2011/07/20 00:58:35, Wez wrote:
> > "and clips to the host screen" doesn't sound right.  The Host needs to cope
> with
> > mouse coordinates outside its dimensions, since it may be resized
> asynchronously
> > to client mouse movement.  What is the purpose of clipping here?
> 
> !ExpandingScopeAlert!
> 
> We should follow up with Simon re: this because the comment (copied from
> chromoting_view.h) is correct - it does clip to the host width/height.
> 
> And I agree that it doesn't seem like it should need to be clipping to the
host.
> 
>
http://codereview.chromium.org/7453003/diff/4001/remoting/client/plugin/peppe...
> remoting/client/plugin/pepper_view.h:81: pp::Point ConvertHostToScreen(const
> pp::Point& p) const;
> On 2011/07/20 00:58:35, Wez wrote:
> > nit: Naming.
> 
> see previous comment re: screen.
> 
>
http://codereview.chromium.org/7453003/diff/4001/remoting/client/plugin/peppe...
> File remoting/client/plugin/pepper_view_proxy.h (right):
> 
>
http://codereview.chromium.org/7453003/diff/4001/remoting/client/plugin/peppe...
> remoting/client/plugin/pepper_view_proxy.h:61: // called only on the pepper
> thread.
> On 2011/07/20 00:58:35, Wez wrote:
> > nit: How does this differ from the other methods on this class?
> 
> It returns a value, whereas all the other methods return void.
> 
> I think I'm misunderstanding your question here.

My point was really just that that method doesn't do anything that requires a
reply from another thread; it just processes an input value, so does it really
need to be tagged as "blocking"?

LGTM other than that, with these changes.

Powered by Google App Engine
This is Rietveld 408576698