On Wed, Dec 24, 2008 at 8:35 PM, Mohamed Mansour
<m0.interact...@gmail.com>wrote:

> the way it works now is by executing the following:
>
>  controller_->AddManagedButton(reload_, IDC_RELOAD);
>
> That line of code is letting the CommandHandler manage key events and mouse
> events. But I want to be able to manage the middle mouse click event, and
> that event differs from left click.
>

There are multiple issues here.

The first issue is that in general IDC_xxx commands don't carry extra info
alongside -- e.g. you can't say "IDC_RELOAD, but with the following
WindowOpenDisposition".  For a number of these, you may need to develop new
infrastructure that can call whatever functions the IDC_xxx handlers
themselves end up calling, and pass this information along.  I don't know
how generic you can make this.

In order to calculate the right info here, one of these buttons should send
clicks, along with whatever keys are down, to DispositionForAction() or
whatever the function is called that determines a   WindowOpenDisposition
from the user's current input (i.e. don't manually plumb middle-clicks,
ctrl-clicks, etc., because you'll miss some actions and waste code).  Then
pass this disposition to the underlying functions that perform actions.

In a lot of these cases it's a bit tricky to know what to actually do.  For
example, if you middle-click the back button, should the newly-create
background tab acquire the full session history of the current tab (minus
the current page, of course)?  This confusion, plus the need for the extra
plumbing, is part of why we haven't bothered implementing this kind of
feature so far.

PK

--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to