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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 6675005: Integrate the new input method API for Views into Chromium. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 9 years, 9 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 #include "grit/chromium_strings.h" 72 #include "grit/chromium_strings.h"
73 #include "grit/generated_resources.h" 73 #include "grit/generated_resources.h"
74 #include "grit/locale_settings.h" 74 #include "grit/locale_settings.h"
75 #include "grit/theme_resources.h" 75 #include "grit/theme_resources.h"
76 #include "grit/webkit_resources.h" 76 #include "grit/webkit_resources.h"
77 #include "ui/base/accessibility/accessible_view_state.h" 77 #include "ui/base/accessibility/accessible_view_state.h"
78 #include "ui/base/l10n/l10n_util.h" 78 #include "ui/base/l10n/l10n_util.h"
79 #include "ui/base/resource/resource_bundle.h" 79 #include "ui/base/resource/resource_bundle.h"
80 #include "ui/gfx/canvas_skia.h" 80 #include "ui/gfx/canvas_skia.h"
81 #include "views/controls/single_split_view.h" 81 #include "views/controls/single_split_view.h"
82 #include "views/events/event.h"
82 #include "views/focus/external_focus_tracker.h" 83 #include "views/focus/external_focus_tracker.h"
83 #include "views/focus/view_storage.h" 84 #include "views/focus/view_storage.h"
84 #include "views/layout/grid_layout.h" 85 #include "views/layout/grid_layout.h"
85 #include "views/widget/root_view.h" 86 #include "views/widget/root_view.h"
86 #include "views/window/dialog_delegate.h" 87 #include "views/window/dialog_delegate.h"
87 #include "views/window/window.h" 88 #include "views/window/window.h"
88 89
89 #if defined(OS_WIN) 90 #if defined(OS_WIN)
90 #include "chrome/browser/aeropeek_manager.h" 91 #include "chrome/browser/aeropeek_manager.h"
91 #include "chrome/browser/jumplist_win.h" 92 #include "chrome/browser/jumplist_win.h"
(...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after
1244 1245
1245 DCHECK(is_keyboard_shortcut != NULL); 1246 DCHECK(is_keyboard_shortcut != NULL);
1246 *is_keyboard_shortcut = true; 1247 *is_keyboard_shortcut = true;
1247 1248
1248 return false; 1249 return false;
1249 } 1250 }
1250 1251
1251 void BrowserView::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { 1252 void BrowserView::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {
1252 #if defined(OS_LINUX) && !defined(TOUCH_UI) 1253 #if defined(OS_LINUX) && !defined(TOUCH_UI)
1253 views::Window* window = GetWidget()->GetWindow(); 1254 views::Window* window = GetWidget()->GetWindow();
1254 if (window && event.os_event && !event.skip_in_browser) 1255 if (window && event.os_event && !event.skip_in_browser) {
1255 static_cast<views::WindowGtk*>(window)->HandleKeyboardEvent(event.os_event); 1256 views::KeyEvent views_event(reinterpret_cast<GdkEvent*>(event.os_event));
1257 static_cast<views::WindowGtk*>(window)->HandleKeyboardEvent(views_event);
1258 }
1256 #else 1259 #else
1257 unhandled_keyboard_event_handler_.HandleKeyboardEvent(event, 1260 unhandled_keyboard_event_handler_.HandleKeyboardEvent(event,
1258 GetFocusManager()); 1261 GetFocusManager());
1259 #endif 1262 #endif
1260 } 1263 }
1261 1264
1262 // TODO(devint): http://b/issue?id=1117225 Cut, Copy, and Paste are always 1265 // TODO(devint): http://b/issue?id=1117225 Cut, Copy, and Paste are always
1263 // enabled in the page menu regardless of whether the command will do 1266 // enabled in the page menu regardless of whether the command will do
1264 // anything. When someone selects the menu item, we just act as if they hit 1267 // anything. When someone selects the menu item, we just act as if they hit
1265 // the keyboard shortcut for the command by sending the associated key press 1268 // the keyboard shortcut for the command by sending the associated key press
(...skipping 1280 matching lines...) Expand 10 before | Expand all | Expand 10 after
2546 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); 2549 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
2547 2550
2548 return view; 2551 return view;
2549 } 2552 }
2550 #endif 2553 #endif
2551 2554
2552 // static 2555 // static
2553 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { 2556 FindBar* BrowserWindow::CreateFindBar(Browser* browser) {
2554 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); 2557 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window()));
2555 } 2558 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698