| OLD | NEW |
| 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 Loading... |
| 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 1153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1245 | 1246 |
| 1246 DCHECK(is_keyboard_shortcut != NULL); | 1247 DCHECK(is_keyboard_shortcut != NULL); |
| 1247 *is_keyboard_shortcut = true; | 1248 *is_keyboard_shortcut = true; |
| 1248 | 1249 |
| 1249 return false; | 1250 return false; |
| 1250 } | 1251 } |
| 1251 | 1252 |
| 1252 void BrowserView::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { | 1253 void BrowserView::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { |
| 1253 #if defined(OS_LINUX) && !defined(TOUCH_UI) | 1254 #if defined(OS_LINUX) && !defined(TOUCH_UI) |
| 1254 views::Window* window = GetWidget()->GetWindow(); | 1255 views::Window* window = GetWidget()->GetWindow(); |
| 1255 if (window && event.os_event && !event.skip_in_browser) | 1256 if (window && event.os_event && !event.skip_in_browser) { |
| 1256 static_cast<views::WindowGtk*>(window)->HandleKeyboardEvent(event.os_event); | 1257 views::KeyEvent views_event(reinterpret_cast<GdkEvent*>(event.os_event)); |
| 1258 static_cast<views::WindowGtk*>(window)->HandleKeyboardEvent(views_event); |
| 1259 } |
| 1257 #else | 1260 #else |
| 1258 unhandled_keyboard_event_handler_.HandleKeyboardEvent(event, | 1261 unhandled_keyboard_event_handler_.HandleKeyboardEvent(event, |
| 1259 GetFocusManager()); | 1262 GetFocusManager()); |
| 1260 #endif | 1263 #endif |
| 1261 } | 1264 } |
| 1262 | 1265 |
| 1263 // TODO(devint): http://b/issue?id=1117225 Cut, Copy, and Paste are always | 1266 // TODO(devint): http://b/issue?id=1117225 Cut, Copy, and Paste are always |
| 1264 // enabled in the page menu regardless of whether the command will do | 1267 // enabled in the page menu regardless of whether the command will do |
| 1265 // anything. When someone selects the menu item, we just act as if they hit | 1268 // anything. When someone selects the menu item, we just act as if they hit |
| 1266 // the keyboard shortcut for the command by sending the associated key press | 1269 // the keyboard shortcut for the command by sending the associated key press |
| (...skipping 1284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2551 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); | 2554 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); |
| 2552 | 2555 |
| 2553 return view; | 2556 return view; |
| 2554 } | 2557 } |
| 2555 #endif | 2558 #endif |
| 2556 | 2559 |
| 2557 // static | 2560 // static |
| 2558 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { | 2561 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { |
| 2559 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); | 2562 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); |
| 2560 } | 2563 } |
| OLD | NEW |