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

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

Issue 6480001: Migrate Event API methods to Google Style. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ui/views/find_bar_host.h" 5 #include "chrome/browser/ui/views/find_bar_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "chrome/browser/renderer_host/render_view_host.h" 9 #include "chrome/browser/renderer_host/render_view_host.h"
10 #include "chrome/browser/tab_contents/tab_contents.h" 10 #include "chrome/browser/tab_contents/tab_contents.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 FindBarHost::~FindBarHost() { 42 FindBarHost::~FindBarHost() {
43 } 43 }
44 44
45 bool FindBarHost::MaybeForwardKeyEventToWebpage( 45 bool FindBarHost::MaybeForwardKeyEventToWebpage(
46 const views::KeyEvent& key_event) { 46 const views::KeyEvent& key_event) {
47 if (!ShouldForwardKeyEventToWebpageNative(key_event)) { 47 if (!ShouldForwardKeyEventToWebpageNative(key_event)) {
48 // Native implementation says not to forward these events. 48 // Native implementation says not to forward these events.
49 return false; 49 return false;
50 } 50 }
51 51
52 switch (key_event.GetKeyCode()) { 52 switch (key_event.key_code()) {
53 case ui::VKEY_DOWN: 53 case ui::VKEY_DOWN:
54 case ui::VKEY_UP: 54 case ui::VKEY_UP:
55 case ui::VKEY_PRIOR: 55 case ui::VKEY_PRIOR:
56 case ui::VKEY_NEXT: 56 case ui::VKEY_NEXT:
57 break; 57 break;
58 case ui::VKEY_HOME: 58 case ui::VKEY_HOME:
59 case ui::VKEY_END: 59 case ui::VKEY_END:
60 if (key_event.IsControlDown()) 60 if (key_event.IsControlDown())
61 break; 61 break;
62 // Fall through. 62 // Fall through.
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 304
305 DropdownBarHost::UnregisterAccelerators(); 305 DropdownBarHost::UnregisterAccelerators();
306 } 306 }
307 307
308 //////////////////////////////////////////////////////////////////////////////// 308 ////////////////////////////////////////////////////////////////////////////////
309 // private: 309 // private:
310 310
311 FindBarView* FindBarHost::find_bar_view() { 311 FindBarView* FindBarHost::find_bar_view() {
312 return static_cast<FindBarView*>(view()); 312 return static_cast<FindBarView*>(view());
313 } 313 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698