// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ozone/wayland/inputs/input_method_event_filter.h"

#include "ui/base/ime/input_method.h"
#include "ui/base/ime/input_method_factory.h"

namespace ozonewayland {

////////////////////////////////////////////////////////////////////////////////
// InputMethodEventFilter, public:

WaylandInputMethodEventFilter::WaylandInputMethodEventFilter()
    : input_method_(ui::CreateInputMethod(this, NULL)) {
  // TODO(yusukes): Check if the root window is currently focused and pass the
  // result to Init().
  input_method_->Init(true);
}

WaylandInputMethodEventFilter::~WaylandInputMethodEventFilter()
{
}

////////////////////////////////////////////////////////////////////////////////
// InputMethodEventFilter, ui::InputMethodDelegate implementation:

bool WaylandInputMethodEventFilter::DispatchKeyEventPostIME(
    const base::NativeEvent& event)
{
}

bool WaylandInputMethodEventFilter::DispatchFabricatedKeyEventPostIME(
    ui::EventType type,
    ui::KeyboardCode key_code,
    int flags)
{
}

}  // namespace ozonewayland

// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ozone/wayland/inputs/input_method_event_filter.h"

#include "ui/base/ime/input_method.h"
#include "ui/base/ime/input_method_factory.h"

namespace ozonewayland {

////////////////////////////////////////////////////////////////////////////////
// InputMethodEventFilter, public:

WaylandInputMethodEventFilter::WaylandInputMethodEventFilter()
    : input_method_(ui::CreateInputMethod(this, 0)) {
  // TODO(yusukes): Check if the root window is currently focused and pass the
  // result to Init().
  input_method_->Init(true);
}

WaylandInputMethodEventFilter::~WaylandInputMethodEventFilter()
{
}

////////////////////////////////////////////////////////////////////////////////
// InputMethodEventFilter, ui::InputMethodDelegate implementation:

bool WaylandInputMethodEventFilter::DispatchKeyEventPostIME(
    const base::NativeEvent& event)
{
}

bool WaylandInputMethodEventFilter::DispatchFabricatedKeyEventPostIME(
    ui::EventType type,
    ui::KeyboardCode key_code,
    int flags)
{
}

}  // namespace ozonewayland

Work around a build error in a very hackish way.
Work around a build error in a very hackish way.

ui::CreateInputMethod()'s second parameter is not a pointer. 0 does not make
things much better either, but this is an area we are not particularly
interested in at the moment.
