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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_gtk.cc

Issue 14487003: Add a new pair of IPC categories for messages that need handling as input events (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addresses feedback Created 7 years, 7 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 | Annotate | Revision Log
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 "content/browser/renderer_host/render_widget_host_view_gtk.h" 5 #include "content/browser/renderer_host/render_widget_host_view_gtk.h"
6 6
7 // If this gets included after the gtk headers, then a bunch of compiler
8 // errors happen because of a "#define Status int" in Xlib.h, which interacts
9 // badly with net::URLRequestStatus::Status.
10 #include "content/common/view_messages.h"
11
12 #include <cairo/cairo.h> 7 #include <cairo/cairo.h>
13 #include <gdk/gdk.h> 8 #include <gdk/gdk.h>
14 #include <gdk/gdkkeysyms.h> 9 #include <gdk/gdkkeysyms.h>
15 #include <gdk/gdkx.h> 10 #include <gdk/gdkx.h>
16 #include <gtk/gtk.h> 11 #include <gtk/gtk.h>
17 12
18 #include <algorithm> 13 #include <algorithm>
19 #include <string> 14 #include <string>
20 15
21 #include "base/bind_helpers.h" 16 #include "base/bind_helpers.h"
22 #include "base/command_line.h" 17 #include "base/command_line.h"
23 #include "base/debug/trace_event.h" 18 #include "base/debug/trace_event.h"
24 #include "base/logging.h" 19 #include "base/logging.h"
25 #include "base/message_loop.h" 20 #include "base/message_loop.h"
26 #include "base/metrics/histogram.h" 21 #include "base/metrics/histogram.h"
27 #include "base/string_number_conversions.h" 22 #include "base/string_number_conversions.h"
28 #include "base/strings/utf_offset_string_conversions.h" 23 #include "base/strings/utf_offset_string_conversions.h"
29 #include "base/time.h" 24 #include "base/time.h"
30 #include "base/utf_string_conversions.h" 25 #include "base/utf_string_conversions.h"
31 #include "content/browser/accessibility/browser_accessibility_gtk.h" 26 #include "content/browser/accessibility/browser_accessibility_gtk.h"
32 #include "content/browser/accessibility/browser_accessibility_manager_gtk.h" 27 #include "content/browser/accessibility/browser_accessibility_manager_gtk.h"
33 #include "content/browser/renderer_host/backing_store_gtk.h" 28 #include "content/browser/renderer_host/backing_store_gtk.h"
34 #include "content/browser/renderer_host/gtk_im_context_wrapper.h" 29 #include "content/browser/renderer_host/gtk_im_context_wrapper.h"
35 #include "content/browser/renderer_host/gtk_key_bindings_handler.h" 30 #include "content/browser/renderer_host/gtk_key_bindings_handler.h"
36 #include "content/browser/renderer_host/gtk_window_utils.h" 31 #include "content/browser/renderer_host/gtk_window_utils.h"
37 #include "content/browser/renderer_host/render_view_host_delegate.h" 32 #include "content/browser/renderer_host/render_view_host_delegate.h"
38 #include "content/browser/renderer_host/render_view_host_impl.h" 33 #include "content/browser/renderer_host/render_view_host_impl.h"
39 #include "content/common/gpu/gpu_messages.h" 34 #include "content/common/gpu/gpu_messages.h"
35 #include "content/common/input_messages.h"
36 #include "content/common/view_messages.h"
40 #include "content/public/browser/browser_context.h" 37 #include "content/public/browser/browser_context.h"
41 #include "content/public/browser/native_web_keyboard_event.h" 38 #include "content/public/browser/native_web_keyboard_event.h"
42 #include "content/public/common/content_switches.h" 39 #include "content/public/common/content_switches.h"
43 #include "skia/ext/platform_canvas.h" 40 #include "skia/ext/platform_canvas.h"
44 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" 41 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
45 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" 42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
46 #include "third_party/WebKit/Source/WebKit/chromium/public/gtk/WebInputEventFact ory.h" 43 #include "third_party/WebKit/Source/WebKit/chromium/public/gtk/WebInputEventFact ory.h"
47 #include "third_party/WebKit/Source/WebKit/chromium/public/x11/WebScreenInfoFact ory.h" 44 #include "third_party/WebKit/Source/WebKit/chromium/public/x11/WebScreenInfoFact ory.h"
48 #include "ui/base/clipboard/scoped_clipboard_writer.h" 45 #include "ui/base/clipboard/scoped_clipboard_writer.h"
49 #include "ui/base/gtk/gtk_compat.h" 46 #include "ui/base/gtk/gtk_compat.h"
(...skipping 1314 matching lines...) Expand 10 before | Expand all | Expand 10 after
1364 } 1361 }
1365 1362
1366 void RenderWidgetHostViewGtk::ForwardKeyboardEvent( 1363 void RenderWidgetHostViewGtk::ForwardKeyboardEvent(
1367 const NativeWebKeyboardEvent& event) { 1364 const NativeWebKeyboardEvent& event) {
1368 if (!host_) 1365 if (!host_)
1369 return; 1366 return;
1370 1367
1371 EditCommands edit_commands; 1368 EditCommands edit_commands;
1372 if (!event.skip_in_browser && 1369 if (!event.skip_in_browser &&
1373 key_bindings_handler_->Match(event, &edit_commands)) { 1370 key_bindings_handler_->Match(event, &edit_commands)) {
1374 Send(new ViewMsg_SetEditCommandsForNextKeyEvent( 1371 Send(new InputMsg_SetEditCommandsForNextKeyEvent(
1375 host_->GetRoutingID(), edit_commands)); 1372 host_->GetRoutingID(), edit_commands));
1376 NativeWebKeyboardEvent copy_event(event); 1373 NativeWebKeyboardEvent copy_event(event);
1377 copy_event.match_edit_command = true; 1374 copy_event.match_edit_command = true;
1378 host_->ForwardKeyboardEvent(copy_event); 1375 host_->ForwardKeyboardEvent(copy_event);
1379 return; 1376 return;
1380 } 1377 }
1381 1378
1382 host_->ForwardKeyboardEvent(event); 1379 host_->ForwardKeyboardEvent(event);
1383 } 1380 }
1384 1381
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
1578 gfx::PluginWindowHandle id) { 1575 gfx::PluginWindowHandle id) {
1579 plugin_container_manager_.CreatePluginContainer(id); 1576 plugin_container_manager_.CreatePluginContainer(id);
1580 } 1577 }
1581 1578
1582 void RenderWidgetHostViewGtk::OnDestroyPluginContainer( 1579 void RenderWidgetHostViewGtk::OnDestroyPluginContainer(
1583 gfx::PluginWindowHandle id) { 1580 gfx::PluginWindowHandle id) {
1584 plugin_container_manager_.DestroyPluginContainer(id); 1581 plugin_container_manager_.DestroyPluginContainer(id);
1585 } 1582 }
1586 1583
1587 } // namespace content 1584 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698