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

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: Restore native_widget_aura change 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
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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 #include "views/events/event.h" 98 #include "views/events/event.h"
99 #include "views/focus/external_focus_tracker.h" 99 #include "views/focus/external_focus_tracker.h"
100 #include "views/focus/view_storage.h" 100 #include "views/focus/view_storage.h"
101 #include "views/layout/grid_layout.h" 101 #include "views/layout/grid_layout.h"
102 #include "views/widget/native_widget.h" 102 #include "views/widget/native_widget.h"
103 #include "views/widget/root_view.h" 103 #include "views/widget/root_view.h"
104 #include "views/widget/widget.h" 104 #include "views/widget/widget.h"
105 #include "views/window/dialog_delegate.h" 105 #include "views/window/dialog_delegate.h"
106 106
107 #if defined(USE_AURA) 107 #if defined(USE_AURA)
108 #include "chrome/browser/ui/views/accelerator_table.h"
108 #include "chrome/browser/ui/views/aura/chrome_shell_delegate.h" 109 #include "chrome/browser/ui/views/aura/chrome_shell_delegate.h"
109 #include "chrome/browser/ui/views/aura/launcher_icon_updater.h" 110 #include "chrome/browser/ui/views/aura/launcher_icon_updater.h"
110 #include "ui/aura_shell/launcher/launcher.h" 111 #include "ui/aura_shell/launcher/launcher.h"
111 #include "ui/aura_shell/launcher/launcher_model.h" 112 #include "ui/aura_shell/launcher/launcher_model.h"
112 #include "ui/aura_shell/shell.h" 113 #include "ui/aura_shell/shell.h"
113 #include "ui/base/view_prop.h" 114 #include "ui/base/view_prop.h"
114 #elif defined(OS_WIN) 115 #elif defined(OS_WIN)
115 #include "chrome/browser/aeropeek_manager.h" 116 #include "chrome/browser/aeropeek_manager.h"
116 #include "chrome/browser/jumplist_win.h" 117 #include "chrome/browser/jumplist_win.h"
117 #include "ui/base/message_box_win.h" 118 #include "ui/base/message_box_win.h"
118 #include "views/widget/native_widget_win.h" 119 #include "views/widget/native_widget_win.h"
119 #elif defined(TOOLKIT_USES_GTK) 120 #elif defined(TOOLKIT_USES_GTK)
120 #include "chrome/browser/ui/views/accelerator_table_linux.h" 121 #include "chrome/browser/ui/views/accelerator_table.h"
121 #include "views/window/hit_test.h" 122 #include "views/window/hit_test.h"
122 #if !defined(TOUCH_UI) 123 #if !defined(TOUCH_UI)
123 #include "chrome/browser/ui/views/handle_web_keyboard_event.h" 124 #include "chrome/browser/ui/views/handle_web_keyboard_event.h"
124 #endif 125 #endif
125 #endif 126 #endif
126 127
127 #if defined(OS_CHROMEOS) 128 #if defined(OS_CHROMEOS)
128 #include "chrome/browser/ui/views/keyboard_overlay_dialog_view.h" 129 #include "chrome/browser/ui/views/keyboard_overlay_dialog_view.h"
129 #include "chrome/browser/ui/webui/chromeos/mobile_setup_dialog.h" 130 #include "chrome/browser/ui/webui/chromeos/mobile_setup_dialog.h"
130 #else 131 #else
(...skipping 2153 matching lines...) Expand 10 before | Expand all | Expand 10 after
2284 // it's in its final position. 2285 // it's in its final position.
2285 ignore_layout_ = false; 2286 ignore_layout_ = false;
2286 Layout(); 2287 Layout();
2287 #if defined(OS_WIN) && !defined(USE_AURA) 2288 #if defined(OS_WIN) && !defined(USE_AURA)
2288 static_cast<views::NativeWidgetWin*>(frame_->native_widget())-> 2289 static_cast<views::NativeWidgetWin*>(frame_->native_widget())->
2289 PopForceHidden(); 2290 PopForceHidden();
2290 #endif 2291 #endif
2291 } 2292 }
2292 2293
2293 void BrowserView::LoadAccelerators() { 2294 void BrowserView::LoadAccelerators() {
2294 #if defined(USE_AURA) 2295 #if defined(OS_WIN) && !defined(USE_AURA)
2295 // TODO(beng):
2296 NOTIMPLEMENTED();
2297 #elif defined(OS_WIN)
2298 HACCEL accelerator_table = AtlLoadAccelerators(IDR_MAINFRAME); 2296 HACCEL accelerator_table = AtlLoadAccelerators(IDR_MAINFRAME);
2299 DCHECK(accelerator_table); 2297 DCHECK(accelerator_table);
2300 2298
2301 // We have to copy the table to access its contents. 2299 // We have to copy the table to access its contents.
2302 int count = CopyAcceleratorTable(accelerator_table, 0, 0); 2300 int count = CopyAcceleratorTable(accelerator_table, 0, 0);
2303 if (count == 0) { 2301 if (count == 0) {
2304 // Nothing to do in that case. 2302 // Nothing to do in that case.
2305 return; 2303 return;
2306 } 2304 }
2307 2305
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
2616 Bubble::Show(this->GetWidget(), bounds, 2614 Bubble::Show(this->GetWidget(), bounds,
2617 views::BubbleBorder::TOP_RIGHT, 2615 views::BubbleBorder::TOP_RIGHT,
2618 bubble_view, bubble_view); 2616 bubble_view, bubble_view);
2619 } 2617 }
2620 2618
2621 void BrowserView::ShowAvatarBubbleFromAvatarButton() { 2619 void BrowserView::ShowAvatarBubbleFromAvatarButton() {
2622 AvatarMenuButton* button = frame_->GetAvatarMenuButton(); 2620 AvatarMenuButton* button = frame_->GetAvatarMenuButton();
2623 if (button) 2621 if (button)
2624 button->ShowAvatarBubble(); 2622 button->ShowAvatarBubble();
2625 } 2623 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/accelerator_table_linux.cc ('k') | chrome/browser/ui/views/keyboard_overlay_dialog_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698