summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspang <spang@chromium.org>2015-11-18 15:39:10 -0800
committerCommit bot <commit-bot@chromium.org>2015-11-18 23:39:54 +0000
commit7d8588911d3d212e0613ab991f203bbfc21fbb43 (patch)
tree4fb8d27d2701a284e2d308d6c23e2d542b6165e3
parent6e9afd9d5ef01504534714930188d9d019adc5e7 (diff)
downloadchromium_src-7d8588911d3d212e0613ab991f203bbfc21fbb43.zip
chromium_src-7d8588911d3d212e0613ab991f203bbfc21fbb43.tar.gz
chromium_src-7d8588911d3d212e0613ab991f203bbfc21fbb43.tar.bz2
ozone: caca: Fix MouseEvent ctor & add PlatformWindow::SetWindowTitle override
This fixes compilation. Review URL: https://codereview.chromium.org/1456163002 Cr-Commit-Position: refs/heads/master@{#360444}
-rw-r--r--ui/ozone/platform/caca/caca_event_source.cc6
-rw-r--r--ui/ozone/platform/caca/caca_window.cc5
-rw-r--r--ui/ozone/platform/caca/caca_window.h1
3 files changed, 10 insertions, 2 deletions
diff --git a/ui/ozone/platform/caca/caca_event_source.cc b/ui/ozone/platform/caca/caca_event_source.cc
index 78d3344..e4ddc70 100644
--- a/ui/ozone/platform/caca/caca_event_source.cc
+++ b/ui/ozone/platform/caca/caca_event_source.cc
@@ -216,8 +216,10 @@ void CacaEventSource::OnInputEvent(caca_event_t* event, CacaWindow* window) {
flags = modifier_flags_ | changed_flags;
}
gfx::PointF location = TranslateLocation(last_cursor_location_, window);
- ui::MouseEvent mouse_event(type, location, location, EventTimeForNow(),
- flags, changed_flags);
+ ui::MouseEvent mouse_event(type, gfx::Point(), gfx::Point(),
+ EventTimeForNow(), flags, changed_flags);
+ mouse_event.set_location_f(location);
+ mouse_event.set_root_location_f(location);
window->OnCacaEvent(&mouse_event);
break;
}
diff --git a/ui/ozone/platform/caca/caca_window.cc b/ui/ozone/platform/caca/caca_window.cc
index 0a346e4..16be188 100644
--- a/ui/ozone/platform/caca/caca_window.cc
+++ b/ui/ozone/platform/caca/caca_window.cc
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/trace_event/trace_event.h"
#include "ui/events/ozone/events_ozone.h"
#include "ui/events/platform/platform_event_source.h"
@@ -140,6 +141,10 @@ PlatformImeController* CacaWindow::GetPlatformImeController() {
return nullptr;
}
+void CacaWindow::SetTitle(const base::string16& title) {
+ caca_set_display_title(display_.get(), UTF16ToUTF8(title).c_str());
+}
+
bool CacaWindow::CanDispatchEvent(const PlatformEvent& event) { return true; }
uint32_t CacaWindow::DispatchEvent(const PlatformEvent& ne) {
diff --git a/ui/ozone/platform/caca/caca_window.h b/ui/ozone/platform/caca/caca_window.h
index 4761375..375a464 100644
--- a/ui/ozone/platform/caca/caca_window.h
+++ b/ui/ozone/platform/caca/caca_window.h
@@ -62,6 +62,7 @@ class CacaWindow : public PlatformWindow, public PlatformEventDispatcher {
void MoveCursorTo(const gfx::Point& location) override;
void ConfineCursorToBounds(const gfx::Rect& bounds) override;
PlatformImeController* GetPlatformImeController() override;
+ void SetTitle(const base::string16& title) override;
// PlatformEventDispatcher:
bool CanDispatchEvent(const PlatformEvent& event) override;