| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/base_paths.h" | 9 #include "base/base_paths.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 1192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1203 "Menu item should be disabled."; | 1203 "Menu item should be disabled."; |
| 1204 | 1204 |
| 1205 NavigationEntry* entry = current_tab->controller().GetLastCommittedEntry(); | 1205 NavigationEntry* entry = current_tab->controller().GetLastCommittedEntry(); |
| 1206 if (!entry) | 1206 if (!entry) |
| 1207 return; | 1207 return; |
| 1208 | 1208 |
| 1209 // RVH's GetApplicationInfo should not be called before it returns. | 1209 // RVH's GetApplicationInfo should not be called before it returns. |
| 1210 DCHECK(pending_web_app_action_ == NONE); | 1210 DCHECK(pending_web_app_action_ == NONE); |
| 1211 pending_web_app_action_ = CREATE_SHORTCUT; | 1211 pending_web_app_action_ = CREATE_SHORTCUT; |
| 1212 | 1212 |
| 1213 // Start fetching web app info for CreateApplicationShortcut dialog and show | 1213 // Start fetching web app info for CreateApplicatoinShortcut dialog and |
| 1214 // the dialog when the data is available in OnDidGetApplicationInfo. | 1214 // show the dialog when the data is available in OnDidGetApplicationInfo. |
| 1215 current_tab->render_view_host()->GetApplicationInfo(entry->page_id()); | 1215 current_tab->render_view_host()->GetApplicationInfo(entry->page_id()); |
| 1216 #else | 1216 #else |
| 1217 NOTIMPLEMENTED(); | 1217 NOTIMPLEMENTED(); |
| 1218 #endif | 1218 #endif |
| 1219 } | 1219 } |
| 1220 | 1220 |
| 1221 void Browser::ToggleDevToolsWindow(bool open_console) { | 1221 void Browser::ToggleDevToolsWindow(bool open_console) { |
| 1222 if (open_console) | 1222 if (open_console) |
| 1223 UserMetrics::RecordAction("DevTools_ToggleConsole", profile_); | 1223 UserMetrics::RecordAction("DevTools_ToggleConsole", profile_); |
| 1224 else | 1224 else |
| (...skipping 1963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3188 /////////////////////////////////////////////////////////////////////////////// | 3188 /////////////////////////////////////////////////////////////////////////////// |
| 3189 // BrowserToolbarModel (private): | 3189 // BrowserToolbarModel (private): |
| 3190 | 3190 |
| 3191 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() { | 3191 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() { |
| 3192 // This |current_tab| can be NULL during the initialization of the | 3192 // This |current_tab| can be NULL during the initialization of the |
| 3193 // toolbar during window creation (i.e. before any tabs have been added | 3193 // toolbar during window creation (i.e. before any tabs have been added |
| 3194 // to the window). | 3194 // to the window). |
| 3195 TabContents* current_tab = browser_->GetSelectedTabContents(); | 3195 TabContents* current_tab = browser_->GetSelectedTabContents(); |
| 3196 return current_tab ? ¤t_tab->controller() : NULL; | 3196 return current_tab ? ¤t_tab->controller() : NULL; |
| 3197 } | 3197 } |
| OLD | NEW |