| 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/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/idle_timer.h" | 9 #include "base/idle_timer.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 #include "net/base/mime_util.h" | 53 #include "net/base/mime_util.h" |
| 54 #include "net/base/net_util.h" | 54 #include "net/base/net_util.h" |
| 55 #include "net/base/registry_controlled_domain.h" | 55 #include "net/base/registry_controlled_domain.h" |
| 56 #include "net/url_request/url_request_context.h" | 56 #include "net/url_request/url_request_context.h" |
| 57 #include "webkit/glue/window_open_disposition.h" | 57 #include "webkit/glue/window_open_disposition.h" |
| 58 | 58 |
| 59 #if defined(OS_WIN) | 59 #if defined(OS_WIN) |
| 60 #include <windows.h> | 60 #include <windows.h> |
| 61 #include <shellapi.h> | 61 #include <shellapi.h> |
| 62 | 62 |
| 63 #include "app/win_util.h" |
| 63 #include "chrome/browser/automation/ui_controls.h" | 64 #include "chrome/browser/automation/ui_controls.h" |
| 64 #include "chrome/browser/browser_process.h" | 65 #include "chrome/browser/browser_process.h" |
| 65 #include "chrome/browser/browser_url_handler.h" | 66 #include "chrome/browser/browser_url_handler.h" |
| 66 #include "chrome/browser/cert_store.h" | 67 #include "chrome/browser/cert_store.h" |
| 67 #include "chrome/browser/debugger/debugger_window.h" | 68 #include "chrome/browser/debugger/debugger_window.h" |
| 68 #include "chrome/browser/dock_info.h" | 69 #include "chrome/browser/dock_info.h" |
| 69 #include "chrome/browser/download/save_package.h" | 70 #include "chrome/browser/download/save_package.h" |
| 70 #include "chrome/browser/options_window.h" | 71 #include "chrome/browser/options_window.h" |
| 71 #include "chrome/browser/ssl/ssl_error_info.h" | 72 #include "chrome/browser/ssl/ssl_error_info.h" |
| 72 #include "chrome/browser/task_manager.h" | 73 #include "chrome/browser/task_manager.h" |
| 73 #include "chrome/browser/user_data_manager.h" | 74 #include "chrome/browser/user_data_manager.h" |
| 74 #include "chrome/browser/view_ids.h" | 75 #include "chrome/browser/view_ids.h" |
| 75 #include "chrome/browser/views/location_bar_view.h" | 76 #include "chrome/browser/views/location_bar_view.h" |
| 76 #include "chrome/browser/window_sizer.h" | 77 #include "chrome/browser/window_sizer.h" |
| 77 #include "chrome/common/child_process_host.h" | 78 #include "chrome/common/child_process_host.h" |
| 78 #include "chrome/common/win_util.h" | |
| 79 | |
| 80 #endif // OS_WIN | 79 #endif // OS_WIN |
| 81 | 80 |
| 82 using base::TimeDelta; | 81 using base::TimeDelta; |
| 83 | 82 |
| 84 // How long we wait before updating the browser chrome while loading a page. | 83 // How long we wait before updating the browser chrome while loading a page. |
| 85 static const int kUIUpdateCoalescingTimeMS = 200; | 84 static const int kUIUpdateCoalescingTimeMS = 200; |
| 86 | 85 |
| 87 // Idle time before helping prune memory consumption. | 86 // Idle time before helping prune memory consumption. |
| 88 static const int kBrowserReleaseMemoryInterval = 30; // In seconds. | 87 static const int kBrowserReleaseMemoryInterval = 30; // In seconds. |
| 89 | 88 |
| (...skipping 2532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2622 | 2621 |
| 2623 // We need to register the window position pref. | 2622 // We need to register the window position pref. |
| 2624 std::wstring window_pref(prefs::kBrowserWindowPlacement); | 2623 std::wstring window_pref(prefs::kBrowserWindowPlacement); |
| 2625 window_pref.append(L"_"); | 2624 window_pref.append(L"_"); |
| 2626 window_pref.append(app_name); | 2625 window_pref.append(app_name); |
| 2627 PrefService* prefs = g_browser_process->local_state(); | 2626 PrefService* prefs = g_browser_process->local_state(); |
| 2628 DCHECK(prefs); | 2627 DCHECK(prefs); |
| 2629 | 2628 |
| 2630 prefs->RegisterDictionaryPref(window_pref.c_str()); | 2629 prefs->RegisterDictionaryPref(window_pref.c_str()); |
| 2631 } | 2630 } |
| OLD | NEW |