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

Unified Diff: ui/aura/root_window_host_x11.cc

Issue 13355002: Implement chrome.brailleDisplayPrivate API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« chrome/common/extensions/api/braille_private.idl ('K') | « ui/aura/DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/root_window_host_x11.cc
diff --git a/ui/aura/root_window_host_x11.cc b/ui/aura/root_window_host_x11.cc
index f69a54a889895c4b1f543a3c6be001f3f73880fd..a208c66f6a16fc332098e15767b3694a449a11d7 100644
--- a/ui/aura/root_window_host_x11.cc
+++ b/ui/aura/root_window_host_x11.cc
@@ -25,6 +25,8 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
+// TODO(plundblad): Need something better than this dependency.
+#include "chrome/browser/extensions/api/braille_private/braille_controller.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkPostConfig.h"
@@ -48,6 +50,7 @@
#include "ui/gfx/codec/png_codec.h"
#include "ui/gfx/screen.h"
+
#if defined(OS_CHROMEOS)
#include "base/chromeos/chromeos_version.h"
#endif
@@ -439,6 +442,9 @@ RootWindowHostX11::RootWindowHostX11(const gfx::Rect& bounds)
XRRSelectInput(xdisplay_, x_root_window_,
RRScreenChangeNotifyMask | RROutputChangeNotifyMask);
Env::GetInstance()->AddObserver(this);
+ // TODO: This is not needed on chromeos, but it is currently on
+ // Linux. Need a better way to handle this.
+ extensions::api::braille_private::BrailleController::AddWindow(xwindow_);
}
RootWindowHostX11::~RootWindowHostX11() {
@@ -449,6 +455,7 @@ RootWindowHostX11::~RootWindowHostX11() {
UnConfineCursor();
XDestroyWindow(xdisplay_, xwindow_);
+ extensions::api::braille_private::BrailleController::RemoveWindow(xwindow_);
}
bool RootWindowHostX11::Dispatch(const base::NativeEvent& event) {
« chrome/common/extensions/api/braille_private.idl ('K') | « ui/aura/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698