Gardening: Fix build with AddressSanitizer.
Remove un-necessary OnChannelClosed function.

DisplayChannelHost is already notified when channel is closed via
OnChannelClosing(IPC::ChannelProxy::MessageFilter). OnChannelClosed
is un-necessary, thus removing its usage.
Remove InputMethodEventFilter

Aura registers a views::corewm::InputMethodEventFilter as an
event filter, and the InputMethodEventFilter uses an implementation
of ui::InputMethod. Ozone implementations should provide any custom
implementation by extending InputMethodContext(will do in a followup
patch) and not InputMethodEventFilter. This patch removes
WaylandInputMethodEventFilter.
Fix destruction observer.

We use MessageLoop::DestructionObserver interface to observe
for browser message loop destruction. This was always called in
InitializeHardware, which is only called from gpuprocess/gputhread.
This patch changes it so that the registration happens only for
browser process. In GPU process/single process mode we inform
dispatcher to stop handling any event processing once we have
deleted the main window.
Fix Chromium build with AddressSanitizer tool.

Removes un-necessary virtual function over-rides as we don't
inherit from BRWHOzone.

This fixes #170
Missing changes from "Fix destruction observer."
Fix Thread race issues and heap corruption in DisplayChannelHost.

Currently, we add deferred messages to a queue in main thread and
handle them in a IO thread. This lead to couple of issues:

1)We are adding to the queue a message in main thread, while
  handling the messages in IO thread.
2)We allocate memory for the queue in main thread(push), while
  we free it in IO thread(pop).

Now, we do so that we post a task to IO thread and all book keeping
happens in IO thread only.

This fixes #169
Gardening: Update to latest revision.

Effecting CLS:
https://codereview.chromium.org/101573006
https://codereview.chromium.org/100213003/
Unify coding style.

Unifies basic coding style across all classes and make cpp lint
happy. All the changes are pretty basic ones. This doesn't handle
any changes which need changes in code(i.e c style casts vs c++),
which need to be handled separately via review process.
Sort includes in alphabetical order.

Sort includes in alphabetical order and make cpplint happy.
Ignore Lint warnings in Messages.

Messages includes ipc messages and MessageGenerator has duplicated
includes as needed by the IPC system. Add exceptions for both these
files to avoid warnings from lint.
Fix code styling.

1)Use sizeof(varname) instead of type.
2)Use c++ style casts.
Fix array size.

We decrement 1 from cursor array size, which seems un-necessary
as we iterate over for loop starting from 0. This patch fixes
the issue.
Dispatcher: Provide support to customize Dispatcher behaviour.

WaylandDispatcher has logic to dispatch events in single and
multi process mode. This is fine but making it hard to fix or
optimize things particular to a use case.
i.e. gpu-process/browser process.

This CL introduces WaylandDispatcherDelegate interface. The
idea here is that dispatcher will use this internally to
handle events. The interface can be extended to customize this
behaviour of dispatcher. Follow up patches introduce
GpuProcessDispatcherDelegate and BrowserProcessDispatcherDelegate.
These implementations will be used to customize the event handling
behaviour of Dispatcher in gpu and browser process respectively.
WaylandDispatcherDelegate: Support for sending messages via IPC.

GpuProcessDispatcherDelegate extends WaylandDispatcherDelegate
and implements the necessary support for dispatching events in
GPU Process via IPC. The logic has been copied from existing
dispatcher class.
WaylandDispatcherDelegate: Support for dispatching events in BrowserProcess.

BrowserProcessDispatcherDelegate extends WaylandDispatcherDelegate
and implements the necessary support for dispatching events in
Browser Process. The logic is copied from existing dispatcher class.
Delegate: WaylandDispatcher should use WaylandDispatcherDelegate.

Refactor WaylandDispatcher to use internally
WaylandDispatcherDelegate. OzoneDisplay is responsible for setting
the correct delegate to WaylandDispatcher.
Export DesktopFactoryWayland and OzoneDisplay.

Their symbols are needed when building downstream code (such as Crosswalk)
with -Dcomponent=shared_library.
impl: Delegate input methods handlers on DRWHW for native widgets

There's at least one access to DRWHW::OnNativeWidgetFocus at views::Widget
initialization time, and although we're not actually implementing any input
methods now, this call here will perform a bunch of eventual initializations
when we need it, like views::Widget::CreateInputMethod,
views::InputMethodBase::Init, views::InputMethodBridge::InputMethodBridge.

Nevertheless that's what DRWHX11 implementation is doing in upstream so let's
follow it as a good practice.
wayland: Don't set focus when pointer enter surface is not found

There's no apparent problems with the previous logic, but that's susceptible
for errors anyway. Besides, now the pointer focus is never set when the surface
is absent.