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

Side by Side Diff: chrome/browser/views/find_bar_host.cc

Issue 220019: A refactor broke the find bar...characters like ! and ( ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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
« no previous file with comments | « chrome/browser/views/find_bar_host.h ('k') | chrome/browser/views/find_bar_host_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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/views/find_bar_host.h" 5 #include "chrome/browser/views/find_bar_host.h"
6 6
7 #include "app/slide_animation.h" 7 #include "app/slide_animation.h"
8 #include "base/keyboard_codes.h" 8 #include "base/keyboard_codes.h"
9 #include "chrome/browser/browser.h" 9 #include "chrome/browser/browser.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 348
349 void FindBarHost::UnregisterEscAccelerator() { 349 void FindBarHost::UnregisterEscAccelerator() {
350 DCHECK(esc_accel_target_registered_); 350 DCHECK(esc_accel_target_registered_);
351 views::Accelerator escape(base::VKEY_ESCAPE, false, false, false); 351 views::Accelerator escape(base::VKEY_ESCAPE, false, false, false);
352 focus_manager_->UnregisterAccelerator(escape, this); 352 focus_manager_->UnregisterAccelerator(escape, this);
353 esc_accel_target_registered_ = false; 353 esc_accel_target_registered_ = false;
354 } 354 }
355 355
356 bool FindBarHost::MaybeForwardKeystrokeToWebpage( 356 bool FindBarHost::MaybeForwardKeystrokeToWebpage(
357 const views::Textfield::Keystroke& key_stroke) { 357 const views::Textfield::Keystroke& key_stroke) {
358 if (!ShouldForwardKeystrokeToWebpageNative(key_stroke)) {
359 // Native implementation not to forward these events.
Finnur 2009/09/23 22:21:40 nit: not -> says not ?
360 return false;
361 }
362
358 switch (key_stroke.GetKeyboardCode()) { 363 switch (key_stroke.GetKeyboardCode()) {
359 case base::VKEY_DOWN: 364 case base::VKEY_DOWN:
360 case base::VKEY_UP: 365 case base::VKEY_UP:
361 case base::VKEY_PRIOR: 366 case base::VKEY_PRIOR:
362 case base::VKEY_NEXT: 367 case base::VKEY_NEXT:
363 break; 368 break;
364 case base::VKEY_HOME: 369 case base::VKEY_HOME:
365 case base::VKEY_END: 370 case base::VKEY_END:
366 if (key_stroke.IsControlHeld()) 371 if (key_stroke.IsControlHeld())
367 break; 372 break;
(...skipping 10 matching lines...) Expand all
378 383
379 // Make sure we don't have a text field element interfering with keyboard 384 // Make sure we don't have a text field element interfering with keyboard
380 // input. Otherwise Up and Down arrow key strokes get eaten. "Nom Nom Nom". 385 // input. Otherwise Up and Down arrow key strokes get eaten. "Nom Nom Nom".
381 render_view_host->ClearFocusedNode(); 386 render_view_host->ClearFocusedNode();
382 NativeWebKeyboardEvent event = GetKeyboardEvent(contents, key_stroke); 387 NativeWebKeyboardEvent event = GetKeyboardEvent(contents, key_stroke);
383 render_view_host->ForwardKeyboardEvent(event); 388 render_view_host->ForwardKeyboardEvent(event);
384 return true; 389 return true;
385 } 390 }
386 391
387 392
OLDNEW
« no previous file with comments | « chrome/browser/views/find_bar_host.h ('k') | chrome/browser/views/find_bar_host_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698