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

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 137993009: Remove more non-aura windows code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: renable the disabled tests Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/browser/ui/views/hung_renderer_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/browser_view.cc
===================================================================
--- chrome/browser/ui/views/frame/browser_view.cc (revision 244775)
+++ chrome/browser/ui/views/frame/browser_view.cc (working copy)
@@ -1176,12 +1176,6 @@
return gfx::Rect();
}
-void BrowserView::DisableInactiveFrame() {
-#if defined(OS_WIN) && !defined(USE_AURA)
- frame_->DisableInactiveRendering();
-#endif // No tricks are needed to get the right behavior on Linux.
-}
-
void BrowserView::ConfirmAddSearchProvider(TemplateURL* template_url,
Profile* profile) {
chrome::EditSearchEngine(GetWidget()->GetNativeWindow(), template_url, NULL,
@@ -1327,18 +1321,6 @@
return false;
}
-#if defined(OS_WIN) && !defined(USE_AURA)
- // As Alt+F4 is the close-app keyboard shortcut, it needs processing
- // immediately.
- if (event.windowsKeyCode == ui::VKEY_F4 &&
- event.type == blink::WebInputEvent::RawKeyDown &&
- event.modifiers == NativeWebKeyboardEvent::AltKey) {
- DefWindowProc(event.os_event.hwnd, event.os_event.message,
- event.os_event.wParam, event.os_event.lParam);
- return true;
- }
-#endif
-
views::FocusManager* focus_manager = GetFocusManager();
DCHECK(focus_manager);
@@ -2278,42 +2260,10 @@
}
void BrowserView::LoadAccelerators() {
-#if defined(OS_WIN) && !defined(USE_AURA)
- HACCEL accelerator_table = AtlLoadAccelerators(IDR_MAINFRAME);
- DCHECK(accelerator_table);
-
- // We have to copy the table to access its contents.
- int count = CopyAcceleratorTable(accelerator_table, 0, 0);
- if (count == 0) {
- // Nothing to do in that case.
- return;
- }
-
- ACCEL* accelerators = static_cast<ACCEL*>(malloc(sizeof(ACCEL) * count));
- CopyAcceleratorTable(accelerator_table, accelerators, count);
-
views::FocusManager* focus_manager = GetFocusManager();
DCHECK(focus_manager);
// Let's fill our own accelerator table.
- for (int i = 0; i < count; ++i) {
- ui::Accelerator accelerator(
- static_cast<ui::KeyboardCode>(accelerators[i].key),
- ui::GetModifiersFromACCEL(accelerators[i]));
- accelerator_table_[accelerator] = accelerators[i].cmd;
-
- // Also register with the focus manager.
- focus_manager->RegisterAccelerator(
- accelerator, ui::AcceleratorManager::kNormalPriority, this);
- }
-
- // We don't need the Windows accelerator table anymore.
- free(accelerators);
-#else
- views::FocusManager* focus_manager = GetFocusManager();
- DCHECK(focus_manager);
-
- // Let's fill our own accelerator table.
const bool is_app_mode = chrome::IsRunningInForcedAppMode();
const std::vector<chrome::AcceleratorMapping> accelerator_list(
chrome::GetAcceleratorList());
@@ -2331,7 +2281,6 @@
focus_manager->RegisterAccelerator(
accelerator, ui::AcceleratorManager::kNormalPriority, this);
}
-#endif
}
int BrowserView::GetCommandIDForAppCommandID(int app_command_id) const {
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/browser/ui/views/hung_renderer_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698