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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc

Issue 1257603006: Refactoring for the InputMethod & InputMethodDelegate interfaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test failures on windows. Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h" 5 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h"
6 6
7 #include <X11/extensions/shape.h> 7 #include <X11/extensions/shape.h>
8 #include <X11/extensions/XInput2.h> 8 #include <X11/extensions/XInput2.h>
9 #include <X11/Xatom.h> 9 #include <X11/Xatom.h>
10 #include <X11/Xregion.h> 10 #include <X11/Xregion.h>
(...skipping 1501 matching lines...) Expand 10 before | Expand all | Expand 10 after
1512 if (g_current_capture && g_current_capture != this && 1512 if (g_current_capture && g_current_capture != this &&
1513 event->type() == ui::ET_TOUCH_PRESSED) { 1513 event->type() == ui::ET_TOUCH_PRESSED) {
1514 ConvertEventToDifferentHost(event, g_current_capture); 1514 ConvertEventToDifferentHost(event, g_current_capture);
1515 g_current_capture->SendEventToProcessor(event); 1515 g_current_capture->SendEventToProcessor(event);
1516 } else { 1516 } else {
1517 SendEventToProcessor(event); 1517 SendEventToProcessor(event);
1518 } 1518 }
1519 } 1519 }
1520 1520
1521 void DesktopWindowTreeHostX11::DispatchKeyEvent(ui::KeyEvent* event) { 1521 void DesktopWindowTreeHostX11::DispatchKeyEvent(ui::KeyEvent* event) {
1522 GetInputMethod()->DispatchKeyEvent(*event); 1522 GetInputMethod()->DispatchKeyEvent(event);
1523 event->StopPropagation(); 1523 event->StopPropagation();
James Su 2015/07/31 11:43:58 remove this line?
Shu Chen 2015/08/03 01:44:47 Done.
1524 } 1524 }
1525 1525
1526 void DesktopWindowTreeHostX11::ConvertEventToDifferentHost( 1526 void DesktopWindowTreeHostX11::ConvertEventToDifferentHost(
1527 ui::LocatedEvent* located_event, 1527 ui::LocatedEvent* located_event,
1528 DesktopWindowTreeHostX11* host) { 1528 DesktopWindowTreeHostX11* host) {
1529 DCHECK_NE(this, host); 1529 DCHECK_NE(this, host);
1530 const gfx::Display display_src = 1530 const gfx::Display display_src =
1531 gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow(window()); 1531 gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow(window());
1532 const gfx::Display display_dest = 1532 const gfx::Display display_dest =
1533 gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow(host->window()); 1533 gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow(host->window());
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
2056 if (linux_ui) { 2056 if (linux_ui) {
2057 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); 2057 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window);
2058 if (native_theme) 2058 if (native_theme)
2059 return native_theme; 2059 return native_theme;
2060 } 2060 }
2061 2061
2062 return ui::NativeTheme::instance(); 2062 return ui::NativeTheme::instance();
2063 } 2063 }
2064 2064
2065 } // namespace views 2065 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698