| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <commdlg.h> | 7 #include <commdlg.h> |
| 8 #include <shellapi.h> | 8 #include <shellapi.h> |
| 9 | 9 |
| 10 #include "base/file_version_info.h" | 10 #include "base/file_version_info.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 /////////////////////////////////////////////////////////////////////////////// | 45 /////////////////////////////////////////////////////////////////////////////// |
| 46 // Event handling and updating | 46 // Event handling and updating |
| 47 // | 47 // |
| 48 void Browser::InitCommandState() { | 48 void Browser::InitCommandState() { |
| 49 // All browser commands whose state isn't set automagically some other way | 49 // All browser commands whose state isn't set automagically some other way |
| 50 // (like Back & Forward with initial page load) must have their state | 50 // (like Back & Forward with initial page load) must have their state |
| 51 // initialized here, otherwise they will be forever disabled. | 51 // initialized here, otherwise they will be forever disabled. |
| 52 | 52 |
| 53 controller_.UpdateCommandEnabled(IDC_STOP, true); | 53 controller_.UpdateCommandEnabled(IDC_STOP, true); |
| 54 controller_.UpdateCommandEnabled(IDC_RELOAD, true); | 54 controller_.UpdateCommandEnabled(IDC_RELOAD, true); |
| 55 controller_.UpdateCommandEnabled(IDC_THREEDEE, true); |
| 55 controller_.UpdateCommandEnabled(IDC_HOME, | 56 controller_.UpdateCommandEnabled(IDC_HOME, |
| 56 GetType() == BrowserType::TABBED_BROWSER); | 57 GetType() == BrowserType::TABBED_BROWSER); |
| 57 controller_.UpdateCommandEnabled(IDC_GO, true); | 58 controller_.UpdateCommandEnabled(IDC_GO, true); |
| 58 controller_.UpdateCommandEnabled(IDC_NEWTAB, true); | 59 controller_.UpdateCommandEnabled(IDC_NEWTAB, true); |
| 59 controller_.UpdateCommandEnabled(IDC_CLOSETAB, true); | 60 controller_.UpdateCommandEnabled(IDC_CLOSETAB, true); |
| 60 controller_.UpdateCommandEnabled(IDC_NEWWINDOW, true); | 61 controller_.UpdateCommandEnabled(IDC_NEWWINDOW, true); |
| 61 controller_.UpdateCommandEnabled(IDC_CLOSEWINDOW, true); | 62 controller_.UpdateCommandEnabled(IDC_CLOSEWINDOW, true); |
| 62 controller_.UpdateCommandEnabled(IDC_FOCUS_LOCATION, true); | 63 controller_.UpdateCommandEnabled(IDC_FOCUS_LOCATION, true); |
| 63 controller_.UpdateCommandEnabled(IDC_FOCUS_SEARCH, true); | 64 controller_.UpdateCommandEnabled(IDC_FOCUS_SEARCH, true); |
| 64 controller_.UpdateCommandEnabled(IDC_FOCUS_TOOLBAR, true); | 65 controller_.UpdateCommandEnabled(IDC_FOCUS_TOOLBAR, true); |
| (...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1074 | 1075 |
| 1075 //////////////////////////////////////////////////////////////////////////////// | 1076 //////////////////////////////////////////////////////////////////////////////// |
| 1076 // Browser, SelectFileDialog::Listener implementation: | 1077 // Browser, SelectFileDialog::Listener implementation: |
| 1077 | 1078 |
| 1078 void Browser::FileSelected(const std::wstring& path, void* params) { | 1079 void Browser::FileSelected(const std::wstring& path, void* params) { |
| 1079 GURL file_url = net::FilePathToFileURL(path); | 1080 GURL file_url = net::FilePathToFileURL(path); |
| 1080 if (!file_url.is_empty()) | 1081 if (!file_url.is_empty()) |
| 1081 OpenURL(file_url, GURL(), CURRENT_TAB, PageTransition::TYPED); | 1082 OpenURL(file_url, GURL(), CURRENT_TAB, PageTransition::TYPED); |
| 1082 } | 1083 } |
| 1083 | 1084 |
| OLD | NEW |