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

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

Issue 10514003: Config UI for Extension Commands (part 1). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after
1159 event.modifiers == NativeWebKeyboardEvent::AltKey) { 1159 event.modifiers == NativeWebKeyboardEvent::AltKey) {
1160 DefWindowProc(event.os_event.hwnd, event.os_event.message, 1160 DefWindowProc(event.os_event.hwnd, event.os_event.message,
1161 event.os_event.wParam, event.os_event.lParam); 1161 event.os_event.wParam, event.os_event.lParam);
1162 return true; 1162 return true;
1163 } 1163 }
1164 #endif 1164 #endif
1165 1165
1166 views::FocusManager* focus_manager = GetFocusManager(); 1166 views::FocusManager* focus_manager = GetFocusManager();
1167 DCHECK(focus_manager); 1167 DCHECK(focus_manager);
1168 1168
1169 if (focus_manager->shortcut_handling_suspended())
1170 return false;
1171
1169 ui::Accelerator accelerator( 1172 ui::Accelerator accelerator(
1170 static_cast<ui::KeyboardCode>(event.windowsKeyCode), 1173 static_cast<ui::KeyboardCode>(event.windowsKeyCode),
1171 content::GetModifiersFromNativeWebKeyboardEvent(event)); 1174 content::GetModifiersFromNativeWebKeyboardEvent(event));
1172 if (event.type == WebKit::WebInputEvent::KeyUp) 1175 if (event.type == WebKit::WebInputEvent::KeyUp)
1173 accelerator.set_type(ui::ET_KEY_RELEASED); 1176 accelerator.set_type(ui::ET_KEY_RELEASED);
1174 1177
1175 // What we have to do here is as follows: 1178 // What we have to do here is as follows:
1176 // - If the |browser_| is for an app, do nothing. 1179 // - If the |browser_| is for an app, do nothing.
1177 // - If the |browser_| is not for an app, and the |accelerator| is not 1180 // - If the |browser_| is not for an app, and the |accelerator| is not
1178 // associated with the browser (e.g. an Ash shortcut), process it. 1181 // associated with the browser (e.g. an Ash shortcut), process it.
(...skipping 1233 matching lines...) Expand 10 before | Expand all | Expand 10 after
2412 form, 2415 form,
2413 this, 2416 this,
2414 web_contents->GetRenderViewHost(), 2417 web_contents->GetRenderViewHost(),
2415 browser_.get(), 2418 browser_.get(),
2416 wrapper->password_manager()); 2419 wrapper->password_manager());
2417 2420
2418 views::BubbleDelegateView::CreateBubble(bubble); 2421 views::BubbleDelegateView::CreateBubble(bubble);
2419 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); 2422 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE);
2420 bubble->Show(); 2423 bubble->Show();
2421 } 2424 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698