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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/idle_timer.h" | 8 #include "base/idle_timer.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
986 #if defined(OS_WIN) || defined(OS_LINUX) | 986 #if defined(OS_WIN) || defined(OS_LINUX) |
987 void Browser::OpenFile() { | 987 void Browser::OpenFile() { |
988 UserMetrics::RecordAction(L"OpenFile", profile_); | 988 UserMetrics::RecordAction(L"OpenFile", profile_); |
989 if (!select_file_dialog_.get()) | 989 if (!select_file_dialog_.get()) |
990 select_file_dialog_ = SelectFileDialog::Create(this); | 990 select_file_dialog_ = SelectFileDialog::Create(this); |
991 | 991 |
992 // TODO(beng): figure out how to juggle this. | 992 // TODO(beng): figure out how to juggle this. |
993 gfx::NativeWindow parent_window = window_->GetNativeHandle(); | 993 gfx::NativeWindow parent_window = window_->GetNativeHandle(); |
994 select_file_dialog_->SelectFile(SelectFileDialog::SELECT_OPEN_FILE, | 994 select_file_dialog_->SelectFile(SelectFileDialog::SELECT_OPEN_FILE, |
995 string16(), FilePath(), | 995 string16(), FilePath(), |
996 std::wstring(), 0, FILE_PATH_LITERAL(""), | 996 NULL, 0, FILE_PATH_LITERAL(""), |
997 parent_window, NULL); | 997 parent_window, NULL); |
998 } | 998 } |
999 #endif | 999 #endif |
1000 | 1000 |
1001 #if defined(OS_WIN) | 1001 #if defined(OS_WIN) |
1002 void Browser::OpenCreateShortcutsDialog() { | 1002 void Browser::OpenCreateShortcutsDialog() { |
1003 UserMetrics::RecordAction(L"CreateShortcut", profile_); | 1003 UserMetrics::RecordAction(L"CreateShortcut", profile_); |
1004 GetSelectedTabContents()->AsWebContents()->CreateShortcut(); | 1004 GetSelectedTabContents()->AsWebContents()->CreateShortcut(); |
1005 } | 1005 } |
1006 | 1006 |
(...skipping 1636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2643 | 2643 |
2644 // We need to register the window position pref. | 2644 // We need to register the window position pref. |
2645 std::wstring window_pref(prefs::kBrowserWindowPlacement); | 2645 std::wstring window_pref(prefs::kBrowserWindowPlacement); |
2646 window_pref.append(L"_"); | 2646 window_pref.append(L"_"); |
2647 window_pref.append(app_name); | 2647 window_pref.append(app_name); |
2648 PrefService* prefs = g_browser_process->local_state(); | 2648 PrefService* prefs = g_browser_process->local_state(); |
2649 DCHECK(prefs); | 2649 DCHECK(prefs); |
2650 | 2650 |
2651 prefs->RegisterDictionaryPref(window_pref.c_str()); | 2651 prefs->RegisterDictionaryPref(window_pref.c_str()); |
2652 } | 2652 } |
OLD | NEW |