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/browser.h" | 5 #include "chrome/browser/browser.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <shellapi.h> | 8 #include <shellapi.h> |
9 #include <windows.h> | 9 #include <windows.h> |
10 #endif // OS_WIN | 10 #endif // OS_WIN |
(...skipping 2892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2903 break; | 2903 break; |
2904 } | 2904 } |
2905 default: | 2905 default: |
2906 NOTREACHED(); | 2906 NOTREACHED(); |
2907 break; | 2907 break; |
2908 } | 2908 } |
2909 | 2909 |
2910 pending_web_app_action_ = NONE; | 2910 pending_web_app_action_ = NONE; |
2911 } | 2911 } |
2912 | 2912 |
| 2913 Browser* Browser::GetBrowser() { |
| 2914 return this; |
| 2915 } |
| 2916 |
2913 /////////////////////////////////////////////////////////////////////////////// | 2917 /////////////////////////////////////////////////////////////////////////////// |
2914 // Browser, SelectFileDialog::Listener implementation: | 2918 // Browser, SelectFileDialog::Listener implementation: |
2915 | 2919 |
2916 void Browser::FileSelected(const FilePath& path, int index, void* params) { | 2920 void Browser::FileSelected(const FilePath& path, int index, void* params) { |
2917 profile_->set_last_selected_directory(path.DirName()); | 2921 profile_->set_last_selected_directory(path.DirName()); |
2918 GURL file_url = net::FilePathToFileURL(path); | 2922 GURL file_url = net::FilePathToFileURL(path); |
2919 if (!file_url.is_empty()) | 2923 if (!file_url.is_empty()) |
2920 OpenURL(file_url, GURL(), CURRENT_TAB, PageTransition::TYPED); | 2924 OpenURL(file_url, GURL(), CURRENT_TAB, PageTransition::TYPED); |
2921 } | 2925 } |
2922 | 2926 |
(...skipping 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4029 } | 4033 } |
4030 | 4034 |
4031 bool Browser::IsPinned(TabContents* source) { | 4035 bool Browser::IsPinned(TabContents* source) { |
4032 int index = tabstrip_model_.GetIndexOfTabContents(source); | 4036 int index = tabstrip_model_.GetIndexOfTabContents(source); |
4033 if (index == TabStripModel::kNoTab) { | 4037 if (index == TabStripModel::kNoTab) { |
4034 NOTREACHED() << "IsPinned called for tab not in our strip"; | 4038 NOTREACHED() << "IsPinned called for tab not in our strip"; |
4035 return false; | 4039 return false; |
4036 } | 4040 } |
4037 return tabstrip_model_.IsTabPinned(index); | 4041 return tabstrip_model_.IsTabPinned(index); |
4038 } | 4042 } |
OLD | NEW |