OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/views/frame/browser_view.h" | 5 #include "chrome/browser/views/frame/browser_view.h" |
6 | 6 |
7 #if defined(OS_LINUX) | 7 #if defined(OS_LINUX) |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1175 gfx::NativeWindow parent = GetWindow()->GetNativeWindow(); | 1175 gfx::NativeWindow parent = GetWindow()->GetNativeWindow(); |
1176 | 1176 |
1177 #if defined(OS_CHROMEOS) | 1177 #if defined(OS_CHROMEOS) |
1178 parent = GetNormalBrowserWindowForBrowser(browser(), profile); | 1178 parent = GetNormalBrowserWindowForBrowser(browser(), profile); |
1179 #endif // defined(OS_CHROMEOS) | 1179 #endif // defined(OS_CHROMEOS) |
1180 | 1180 |
1181 browser::ShowPageInfo(parent, profile, url, ssl, show_history); | 1181 browser::ShowPageInfo(parent, profile, url, ssl, show_history); |
1182 } | 1182 } |
1183 | 1183 |
1184 void BrowserView::ShowPageMenu() { | 1184 void BrowserView::ShowPageMenu() { |
1185 toolbar_->page_menu()->Activate(); | 1185 // TODO(sky): get rid of this and bindings if we decide to keep the new merged |
| 1186 // menu. |
| 1187 if (toolbar_->page_menu()) |
| 1188 toolbar_->page_menu()->Activate(); |
1186 } | 1189 } |
1187 | 1190 |
1188 void BrowserView::ShowAppMenu() { | 1191 void BrowserView::ShowAppMenu() { |
1189 toolbar_->app_menu()->Activate(); | 1192 toolbar_->app_menu()->Activate(); |
1190 } | 1193 } |
1191 | 1194 |
1192 bool BrowserView::PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, | 1195 bool BrowserView::PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, |
1193 bool* is_keyboard_shortcut) { | 1196 bool* is_keyboard_shortcut) { |
1194 if (event.type != WebKit::WebInputEvent::RawKeyDown) | 1197 if (event.type != WebKit::WebInputEvent::RawKeyDown) |
1195 return false; | 1198 return false; |
(...skipping 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2298 SetAccessibleName(l10n_util::GetString(IDS_PRODUCT_NAME)); | 2301 SetAccessibleName(l10n_util::GetString(IDS_PRODUCT_NAME)); |
2299 | 2302 |
2300 return view; | 2303 return view; |
2301 } | 2304 } |
2302 #endif | 2305 #endif |
2303 | 2306 |
2304 // static | 2307 // static |
2305 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { | 2308 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { |
2306 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); | 2309 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); |
2307 } | 2310 } |
OLD | NEW |