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

Side by Side Diff: chrome/browser/renderer_host/render_widget_host.cc

Issue 3165064: Move the keyboard files from base/ to app/. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: latest merge Created 10 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/renderer_host/render_widget_host.h" 5 #include "chrome/browser/renderer_host/render_widget_host.h"
6 6
7 #include "app/keyboard_codes.h"
7 #include "base/auto_reset.h" 8 #include "base/auto_reset.h"
8 #include "base/command_line.h" 9 #include "base/command_line.h"
9 #include "base/histogram.h" 10 #include "base/histogram.h"
10 #include "base/keyboard_codes.h"
11 #include "base/message_loop.h" 11 #include "base/message_loop.h"
12 #include "chrome/browser/chrome_thread.h" 12 #include "chrome/browser/chrome_thread.h"
13 #include "chrome/browser/renderer_host/backing_store.h" 13 #include "chrome/browser/renderer_host/backing_store.h"
14 #include "chrome/browser/renderer_host/backing_store_manager.h" 14 #include "chrome/browser/renderer_host/backing_store_manager.h"
15 #include "chrome/browser/renderer_host/render_process_host.h" 15 #include "chrome/browser/renderer_host/render_process_host.h"
16 #include "chrome/browser/renderer_host/render_widget_helper.h" 16 #include "chrome/browser/renderer_host/render_widget_helper.h"
17 #include "chrome/browser/renderer_host/render_widget_host_painting_observer.h" 17 #include "chrome/browser/renderer_host/render_widget_host_painting_observer.h"
18 #include "chrome/browser/renderer_host/render_widget_host_view.h" 18 #include "chrome/browser/renderer_host/render_widget_host_view.h"
19 #include "chrome/browser/renderer_host/video_layer.h" 19 #include "chrome/browser/renderer_host/video_layer.h"
20 #include "chrome/common/chrome_switches.h" 20 #include "chrome/common/chrome_switches.h"
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 461
462 ForwardInputEvent(wheel_event, sizeof(WebMouseWheelEvent), false); 462 ForwardInputEvent(wheel_event, sizeof(WebMouseWheelEvent), false);
463 } 463 }
464 464
465 void RenderWidgetHost::ForwardKeyboardEvent( 465 void RenderWidgetHost::ForwardKeyboardEvent(
466 const NativeWebKeyboardEvent& key_event) { 466 const NativeWebKeyboardEvent& key_event) {
467 if (ignore_input_events_ || process_->ignore_input_events()) 467 if (ignore_input_events_ || process_->ignore_input_events())
468 return; 468 return;
469 469
470 if (key_event.type == WebKeyboardEvent::Char && 470 if (key_event.type == WebKeyboardEvent::Char &&
471 (key_event.windowsKeyCode == base::VKEY_RETURN || 471 (key_event.windowsKeyCode == app::VKEY_RETURN ||
472 key_event.windowsKeyCode == base::VKEY_SPACE)) { 472 key_event.windowsKeyCode == app::VKEY_SPACE)) {
473 OnUserGesture(); 473 OnUserGesture();
474 } 474 }
475 475
476 // Double check the type to make sure caller hasn't sent us nonsense that 476 // Double check the type to make sure caller hasn't sent us nonsense that
477 // will mess up our key queue. 477 // will mess up our key queue.
478 if (WebInputEvent::isKeyboardEventType(key_event.type)) { 478 if (WebInputEvent::isKeyboardEventType(key_event.type)) {
479 if (suppress_next_char_events_) { 479 if (suppress_next_char_events_) {
480 // If preceding RawKeyDown event was handled by the browser, then we need 480 // If preceding RawKeyDown event was handled by the browser, then we need
481 // suppress all Char events generated by it. Please note that, one 481 // suppress all Char events generated by it. Please note that, one
482 // RawKeyDown event may generate multiple Char events, so we can't reset 482 // RawKeyDown event may generate multiple Char events, so we can't reset
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
1188 // of this key event. 1188 // of this key event.
1189 if (!processed && !is_hidden_ && !front_item.skip_in_browser) { 1189 if (!processed && !is_hidden_ && !front_item.skip_in_browser) {
1190 UnhandledKeyboardEvent(front_item); 1190 UnhandledKeyboardEvent(front_item);
1191 1191
1192 // WARNING: This RenderWidgetHost can be deallocated at this point 1192 // WARNING: This RenderWidgetHost can be deallocated at this point
1193 // (i.e. in the case of Ctrl+W, where the call to 1193 // (i.e. in the case of Ctrl+W, where the call to
1194 // UnhandledKeyboardEvent destroys this RenderWidgetHost). 1194 // UnhandledKeyboardEvent destroys this RenderWidgetHost).
1195 } 1195 }
1196 } 1196 }
1197 } 1197 }
OLDNEW
« no previous file with comments | « chrome/browser/gtk/browser_window_gtk.cc ('k') | chrome/browser/renderer_host/render_widget_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698