| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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/browser.h" | 5 #include "chrome/browser/browser.h" |
| 6 | 6 |
| 7 #include "app/animation.h" | 7 #include "app/animation.h" |
| 8 #include "app/l10n_util.h" | 8 #include "app/l10n_util.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/idle_timer.h" | 10 #include "base/idle_timer.h" |
| (...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1107 // TODO(beng): figure out how to juggle this. | 1107 // TODO(beng): figure out how to juggle this. |
| 1108 gfx::NativeWindow parent_window = window_->GetNativeHandle(); | 1108 gfx::NativeWindow parent_window = window_->GetNativeHandle(); |
| 1109 select_file_dialog_->SelectFile(SelectFileDialog::SELECT_OPEN_FILE, | 1109 select_file_dialog_->SelectFile(SelectFileDialog::SELECT_OPEN_FILE, |
| 1110 string16(), FilePath(), | 1110 string16(), FilePath(), |
| 1111 NULL, 0, FILE_PATH_LITERAL(""), | 1111 NULL, 0, FILE_PATH_LITERAL(""), |
| 1112 parent_window, NULL); | 1112 parent_window, NULL); |
| 1113 } | 1113 } |
| 1114 | 1114 |
| 1115 void Browser::OpenCreateShortcutsDialog() { | 1115 void Browser::OpenCreateShortcutsDialog() { |
| 1116 UserMetrics::RecordAction(L"CreateShortcut", profile_); | 1116 UserMetrics::RecordAction(L"CreateShortcut", profile_); |
| 1117 #if defined(OS_WIN) | 1117 #if defined(OS_WIN) || defined(OS_LINUX) |
| 1118 GetSelectedTabContents()->CreateShortcut(); | 1118 GetSelectedTabContents()->CreateShortcut(); |
| 1119 #else | 1119 #else |
| 1120 NOTIMPLEMENTED(); | 1120 NOTIMPLEMENTED(); |
| 1121 #endif | 1121 #endif |
| 1122 } | 1122 } |
| 1123 | 1123 |
| 1124 void Browser::ToggleDevToolsWindow() { | 1124 void Browser::ToggleDevToolsWindow() { |
| 1125 UserMetrics::RecordAction(L"ShowJSConsole", profile_); | 1125 UserMetrics::RecordAction(L"ShowJSConsole", profile_); |
| 1126 DevToolsManager::GetInstance()->ToggleDevToolsWindow( | 1126 DevToolsManager::GetInstance()->ToggleDevToolsWindow( |
| 1127 GetSelectedTabContents()->render_view_host()); | 1127 GetSelectedTabContents()->render_view_host()); |
| (...skipping 1667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2795 /////////////////////////////////////////////////////////////////////////////// | 2795 /////////////////////////////////////////////////////////////////////////////// |
| 2796 // BrowserToolbarModel (private): | 2796 // BrowserToolbarModel (private): |
| 2797 | 2797 |
| 2798 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() { | 2798 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() { |
| 2799 // This |current_tab| can be NULL during the initialization of the | 2799 // This |current_tab| can be NULL during the initialization of the |
| 2800 // toolbar during window creation (i.e. before any tabs have been added | 2800 // toolbar during window creation (i.e. before any tabs have been added |
| 2801 // to the window). | 2801 // to the window). |
| 2802 TabContents* current_tab = browser_->GetSelectedTabContents(); | 2802 TabContents* current_tab = browser_->GetSelectedTabContents(); |
| 2803 return current_tab ? ¤t_tab->controller() : NULL; | 2803 return current_tab ? ¤t_tab->controller() : NULL; |
| 2804 } | 2804 } |
| OLD | NEW |