| 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/animation.h" | 7 #include "app/animation.h" |
| 8 #include "app/l10n_util.h" | 8 #include "app/l10n_util.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/idle_timer.h" | 10 #include "base/idle_timer.h" |
| (...skipping 1833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1844 } | 1844 } |
| 1845 | 1845 |
| 1846 void Browser::UpdateDownloadShelfVisibility(bool visible) { | 1846 void Browser::UpdateDownloadShelfVisibility(bool visible) { |
| 1847 GetStatusBubble()->UpdateDownloadShelfVisibility(visible); | 1847 GetStatusBubble()->UpdateDownloadShelfVisibility(visible); |
| 1848 } | 1848 } |
| 1849 | 1849 |
| 1850 void Browser::ContentsZoomChange(bool zoom_in) { | 1850 void Browser::ContentsZoomChange(bool zoom_in) { |
| 1851 ExecuteCommand(zoom_in ? IDC_ZOOM_PLUS : IDC_ZOOM_MINUS); | 1851 ExecuteCommand(zoom_in ? IDC_ZOOM_PLUS : IDC_ZOOM_MINUS); |
| 1852 } | 1852 } |
| 1853 | 1853 |
| 1854 void Browser::TabContentsFocused(TabContents* tab_content) { |
| 1855 window_->TabContentsFocused(tab_content); |
| 1856 } |
| 1857 |
| 1854 bool Browser::IsApplication() const { | 1858 bool Browser::IsApplication() const { |
| 1855 return (type_ & TYPE_APP) != 0; | 1859 return (type_ & TYPE_APP) != 0; |
| 1856 } | 1860 } |
| 1857 | 1861 |
| 1858 void Browser::ConvertContentsToApplication(TabContents* contents) { | 1862 void Browser::ConvertContentsToApplication(TabContents* contents) { |
| 1859 const GURL& url = contents->controller().GetActiveEntry()->url(); | 1863 const GURL& url = contents->controller().GetActiveEntry()->url(); |
| 1860 std::wstring app_name = ComputeApplicationNameFromURL(url); | 1864 std::wstring app_name = ComputeApplicationNameFromURL(url); |
| 1861 RegisterAppPrefs(app_name); | 1865 RegisterAppPrefs(app_name); |
| 1862 | 1866 |
| 1863 DetachContents(contents); | 1867 DetachContents(contents); |
| (...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2698 | 2702 |
| 2699 // We need to register the window position pref. | 2703 // We need to register the window position pref. |
| 2700 std::wstring window_pref(prefs::kBrowserWindowPlacement); | 2704 std::wstring window_pref(prefs::kBrowserWindowPlacement); |
| 2701 window_pref.append(L"_"); | 2705 window_pref.append(L"_"); |
| 2702 window_pref.append(app_name); | 2706 window_pref.append(app_name); |
| 2703 PrefService* prefs = g_browser_process->local_state(); | 2707 PrefService* prefs = g_browser_process->local_state(); |
| 2704 DCHECK(prefs); | 2708 DCHECK(prefs); |
| 2705 | 2709 |
| 2706 prefs->RegisterDictionaryPref(window_pref.c_str()); | 2710 prefs->RegisterDictionaryPref(window_pref.c_str()); |
| 2707 } | 2711 } |
| OLD | NEW |