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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.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/frame/browser_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #if defined(OS_LINUX) 7 #if defined(OS_LINUX)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 1237 matching lines...) Expand 10 before | Expand all | Expand 10 after
1248 DCHECK(focus_manager); 1248 DCHECK(focus_manager);
1249 1249
1250 #if defined(OS_LINUX) && !defined(TOUCH_UI) 1250 #if defined(OS_LINUX) && !defined(TOUCH_UI)
1251 // Views and WebKit use different tables for GdkEventKey -> views::KeyEvent 1251 // Views and WebKit use different tables for GdkEventKey -> views::KeyEvent
1252 // conversion. We need to use View's conversion table here to keep consistent 1252 // conversion. We need to use View's conversion table here to keep consistent
1253 // behavior with views::FocusManager::OnKeyEvent() method. 1253 // behavior with views::FocusManager::OnKeyEvent() method.
1254 // TODO(suzhe): We need to check if Windows code also has this issue, and 1254 // TODO(suzhe): We need to check if Windows code also has this issue, and
1255 // it'll be best if we can unify these conversion tables. 1255 // it'll be best if we can unify these conversion tables.
1256 // See http://crbug.com/54315 1256 // See http://crbug.com/54315
1257 views::KeyEvent views_event(event.os_event); 1257 views::KeyEvent views_event(event.os_event);
1258 views::Accelerator accelerator(views_event.GetKeyCode(), 1258 views::Accelerator accelerator(views_event.key_code(),
1259 views_event.IsShiftDown(), 1259 views_event.IsShiftDown(),
1260 views_event.IsControlDown(), 1260 views_event.IsControlDown(),
1261 views_event.IsAltDown()); 1261 views_event.IsAltDown());
1262 #else 1262 #else
1263 views::Accelerator accelerator( 1263 views::Accelerator accelerator(
1264 static_cast<ui::KeyboardCode>(event.windowsKeyCode), 1264 static_cast<ui::KeyboardCode>(event.windowsKeyCode),
1265 (event.modifiers & NativeWebKeyboardEvent::ShiftKey) == 1265 (event.modifiers & NativeWebKeyboardEvent::ShiftKey) ==
1266 NativeWebKeyboardEvent::ShiftKey, 1266 NativeWebKeyboardEvent::ShiftKey,
1267 (event.modifiers & NativeWebKeyboardEvent::ControlKey) == 1267 (event.modifiers & NativeWebKeyboardEvent::ControlKey) ==
1268 NativeWebKeyboardEvent::ControlKey, 1268 NativeWebKeyboardEvent::ControlKey,
(...skipping 1292 matching lines...) Expand 10 before | Expand all | Expand 10 after
2561 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); 2561 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
2562 2562
2563 return view; 2563 return view;
2564 } 2564 }
2565 #endif 2565 #endif
2566 2566
2567 // static 2567 // static
2568 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { 2568 FindBar* BrowserWindow::CreateFindBar(Browser* browser) {
2569 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); 2569 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window()));
2570 } 2570 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698