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

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

Issue 8341050: Aura: Support non-global keyboard shortcuts. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address comments Created 9 years, 1 month 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
« no previous file with comments | « no previous file | views/widget/native_widget_aura.cc » ('j') | views/widget/native_widget_aura.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(TOOLKIT_USES_GTK) 7 #if defined(TOOLKIT_USES_GTK)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 #include "views/events/event.h" 99 #include "views/events/event.h"
100 #include "views/focus/external_focus_tracker.h" 100 #include "views/focus/external_focus_tracker.h"
101 #include "views/focus/view_storage.h" 101 #include "views/focus/view_storage.h"
102 #include "views/layout/grid_layout.h" 102 #include "views/layout/grid_layout.h"
103 #include "views/widget/native_widget.h" 103 #include "views/widget/native_widget.h"
104 #include "views/widget/root_view.h" 104 #include "views/widget/root_view.h"
105 #include "views/widget/widget.h" 105 #include "views/widget/widget.h"
106 #include "views/window/dialog_delegate.h" 106 #include "views/window/dialog_delegate.h"
107 107
108 #if defined(USE_AURA) 108 #if defined(USE_AURA)
109 #include "chrome/browser/ui/views/accelerator_table_linux.h"
mazda 2011/10/28 14:44:33 Now that this header is used for win_aura as well,
109 #include "chrome/browser/ui/views/aura/chrome_shell_delegate.h" 110 #include "chrome/browser/ui/views/aura/chrome_shell_delegate.h"
110 #include "chrome/browser/ui/views/aura/launcher_icon_updater.h" 111 #include "chrome/browser/ui/views/aura/launcher_icon_updater.h"
111 #include "ui/aura_shell/launcher/launcher.h" 112 #include "ui/aura_shell/launcher/launcher.h"
112 #include "ui/aura_shell/launcher/launcher_model.h" 113 #include "ui/aura_shell/launcher/launcher_model.h"
113 #include "ui/aura_shell/shell.h" 114 #include "ui/aura_shell/shell.h"
114 #include "ui/base/view_prop.h" 115 #include "ui/base/view_prop.h"
115 #elif defined(OS_WIN) 116 #elif defined(OS_WIN)
116 #include "chrome/browser/aeropeek_manager.h" 117 #include "chrome/browser/aeropeek_manager.h"
117 #include "chrome/browser/jumplist_win.h" 118 #include "chrome/browser/jumplist_win.h"
118 #include "ui/base/message_box_win.h" 119 #include "ui/base/message_box_win.h"
119 #include "views/widget/native_widget_win.h"
120 #elif defined(TOOLKIT_USES_GTK) 120 #elif defined(TOOLKIT_USES_GTK)
121 #include "chrome/browser/ui/views/accelerator_table_linux.h" 121 #include "chrome/browser/ui/views/accelerator_table_linux.h"
122 #include "views/window/hit_test.h" 122 #include "views/window/hit_test.h"
123 #if !defined(TOUCH_UI) 123 #if !defined(TOUCH_UI)
124 #include "chrome/browser/ui/views/handle_web_keyboard_event.h" 124 #include "chrome/browser/ui/views/handle_web_keyboard_event.h"
125 #endif 125 #endif
126 #endif 126 #endif
127 127
128 #if defined(OS_CHROMEOS) 128 #if defined(OS_CHROMEOS)
129 #include "chrome/browser/ui/views/keyboard_overlay_dialog_view.h" 129 #include "chrome/browser/ui/views/keyboard_overlay_dialog_view.h"
130 #include "chrome/browser/ui/webui/chromeos/mobile_setup_dialog.h" 130 #include "chrome/browser/ui/webui/chromeos/mobile_setup_dialog.h"
131 #else 131 #else
132 #include "chrome/browser/ui/views/download/download_shelf_view.h" 132 #include "chrome/browser/ui/views/download/download_shelf_view.h"
133 #endif 133 #endif
134 134
135 #if defined(OS_WIN)
136 #include "views/widget/native_widget_win.h"
Ben Goodger (Google) 2011/10/27 15:33:01 This is wrong. We don't build this file on OS_WIN
mazda 2011/10/28 14:44:33 Done.
137 #endif
138
135 #if defined(OS_WIN) && !defined(USE_AURA) 139 #if defined(OS_WIN) && !defined(USE_AURA)
136 #include "ui/base/view_prop.h" 140 #include "ui/base/view_prop.h"
137 #endif 141 #endif
138 142
139 #if defined(TOUCH_UI) 143 #if defined(TOUCH_UI)
140 #include "chrome/browser/ui/touch/status_bubble_touch.h" 144 #include "chrome/browser/ui/touch/status_bubble_touch.h"
141 #endif 145 #endif
142 146
143 using base::TimeDelta; 147 using base::TimeDelta;
144 using views::ColumnSet; 148 using views::ColumnSet;
(...skipping 2147 matching lines...) Expand 10 before | Expand all | Expand 10 after
2292 // it's in its final position. 2296 // it's in its final position.
2293 ignore_layout_ = false; 2297 ignore_layout_ = false;
2294 Layout(); 2298 Layout();
2295 #if defined(OS_WIN) && !defined(USE_AURA) 2299 #if defined(OS_WIN) && !defined(USE_AURA)
2296 static_cast<views::NativeWidgetWin*>(frame_->native_widget())-> 2300 static_cast<views::NativeWidgetWin*>(frame_->native_widget())->
2297 PopForceHidden(); 2301 PopForceHidden();
2298 #endif 2302 #endif
2299 } 2303 }
2300 2304
2301 void BrowserView::LoadAccelerators() { 2305 void BrowserView::LoadAccelerators() {
2302 #if defined(USE_AURA) 2306 #if defined(OS_WIN)
Ben Goodger (Google) 2011/10/27 15:33:01 What I meant here was can we use the Linux acceler
mazda 2011/10/28 14:44:33 Ah, I understood. I fixed it and checked that shor
2303 // TODO(beng):
2304 NOTIMPLEMENTED();
2305 #elif defined(OS_WIN)
2306 HACCEL accelerator_table = AtlLoadAccelerators(IDR_MAINFRAME); 2307 HACCEL accelerator_table = AtlLoadAccelerators(IDR_MAINFRAME);
2307 DCHECK(accelerator_table); 2308 DCHECK(accelerator_table);
2308 2309
2309 // We have to copy the table to access its contents. 2310 // We have to copy the table to access its contents.
2310 int count = CopyAcceleratorTable(accelerator_table, 0, 0); 2311 int count = CopyAcceleratorTable(accelerator_table, 0, 0);
2311 if (count == 0) { 2312 if (count == 0) {
2312 // Nothing to do in that case. 2313 // Nothing to do in that case.
2313 return; 2314 return;
2314 } 2315 }
2315 2316
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
2624 Bubble::Show(this->GetWidget(), bounds, 2625 Bubble::Show(this->GetWidget(), bounds,
2625 views::BubbleBorder::TOP_RIGHT, 2626 views::BubbleBorder::TOP_RIGHT,
2626 bubble_view, bubble_view); 2627 bubble_view, bubble_view);
2627 } 2628 }
2628 2629
2629 void BrowserView::ShowAvatarBubbleFromAvatarButton() { 2630 void BrowserView::ShowAvatarBubbleFromAvatarButton() {
2630 AvatarMenuButton* button = frame_->GetAvatarMenuButton(); 2631 AvatarMenuButton* button = frame_->GetAvatarMenuButton();
2631 if (button) 2632 if (button)
2632 button->ShowAvatarBubble(); 2633 button->ShowAvatarBubble();
2633 } 2634 }
OLDNEW
« no previous file with comments | « no previous file | views/widget/native_widget_aura.cc » ('j') | views/widget/native_widget_aura.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698