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(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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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) && !defined(USE_AURA) | 135 #if defined(OS_WIN) && !defined(USE_AURA) |
136 #include "ui/base/view_prop.h" | 136 #include "ui/base/view_prop.h" |
137 #endif | 137 #endif |
138 | 138 |
139 #if defined(OS_LINUX) && defined(USE_AURA) | |
Ben Goodger (Google)
2011/10/26 19:06:04
Will this build & run on Windows too? If so, let's
mazda
2011/10/27 13:05:05
Done.
| |
140 #include "chrome/browser/ui/views/accelerator_table_linux.h" | |
141 #endif | |
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; |
145 using views::GridLayout; | 149 using views::GridLayout; |
146 | 150 |
147 // The height of the status bubble. | 151 // The height of the status bubble. |
148 static const int kStatusBubbleHeight = 20; | 152 static const int kStatusBubbleHeight = 20; |
(...skipping 2143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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) && defined(USE_AURA) |
Ben Goodger (Google)
2011/10/26 19:06:04
same comment here.
I'd like to share as much in c
mazda
2011/10/27 13:05:05
Done.
| |
2303 // TODO(beng): | 2307 // TODO(beng): |
2304 NOTIMPLEMENTED(); | 2308 NOTIMPLEMENTED(); |
2305 #elif defined(OS_WIN) | 2309 #elif defined(OS_WIN) |
2306 HACCEL accelerator_table = AtlLoadAccelerators(IDR_MAINFRAME); | 2310 HACCEL accelerator_table = AtlLoadAccelerators(IDR_MAINFRAME); |
2307 DCHECK(accelerator_table); | 2311 DCHECK(accelerator_table); |
2308 | 2312 |
2309 // We have to copy the table to access its contents. | 2313 // We have to copy the table to access its contents. |
2310 int count = CopyAcceleratorTable(accelerator_table, 0, 0); | 2314 int count = CopyAcceleratorTable(accelerator_table, 0, 0); |
2311 if (count == 0) { | 2315 if (count == 0) { |
2312 // Nothing to do in that case. | 2316 // Nothing to do in that case. |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2624 Bubble::Show(this->GetWidget(), bounds, | 2628 Bubble::Show(this->GetWidget(), bounds, |
2625 views::BubbleBorder::TOP_RIGHT, | 2629 views::BubbleBorder::TOP_RIGHT, |
2626 bubble_view, bubble_view); | 2630 bubble_view, bubble_view); |
2627 } | 2631 } |
2628 | 2632 |
2629 void BrowserView::ShowAvatarBubbleFromAvatarButton() { | 2633 void BrowserView::ShowAvatarBubbleFromAvatarButton() { |
2630 AvatarMenuButton* button = frame_->GetAvatarMenuButton(); | 2634 AvatarMenuButton* button = frame_->GetAvatarMenuButton(); |
2631 if (button) | 2635 if (button) |
2632 button->ShowAvatarBubble(); | 2636 button->ShowAvatarBubble(); |
2633 } | 2637 } |
OLD | NEW |