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 1893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1904 void Browser::UpdateTargetURL(TabContents* source, const GURL& url) { | 1904 void Browser::UpdateTargetURL(TabContents* source, const GURL& url) { |
1905 if (!GetStatusBubble()) | 1905 if (!GetStatusBubble()) |
1906 return; | 1906 return; |
1907 | 1907 |
1908 if (source == GetSelectedTabContents()) { | 1908 if (source == GetSelectedTabContents()) { |
1909 PrefService* prefs = profile_->GetPrefs(); | 1909 PrefService* prefs = profile_->GetPrefs(); |
1910 GetStatusBubble()->SetURL(url, prefs->GetString(prefs::kAcceptLanguages)); | 1910 GetStatusBubble()->SetURL(url, prefs->GetString(prefs::kAcceptLanguages)); |
1911 } | 1911 } |
1912 } | 1912 } |
1913 | 1913 |
| 1914 void Browser::UpdateDownloadShelfVisibility(bool visible) { |
| 1915 GetStatusBubble()->UpdateDownloadShelfVisibility(visible); |
| 1916 } |
| 1917 |
1914 void Browser::ContentsZoomChange(bool zoom_in) { | 1918 void Browser::ContentsZoomChange(bool zoom_in) { |
1915 ExecuteCommand(zoom_in ? IDC_ZOOM_PLUS : IDC_ZOOM_MINUS); | 1919 ExecuteCommand(zoom_in ? IDC_ZOOM_PLUS : IDC_ZOOM_MINUS); |
1916 } | 1920 } |
1917 | 1921 |
1918 bool Browser::IsApplication() const { | 1922 bool Browser::IsApplication() const { |
1919 return (type_ & TYPE_APP) != 0; | 1923 return (type_ & TYPE_APP) != 0; |
1920 } | 1924 } |
1921 | 1925 |
1922 void Browser::ConvertContentsToApplication(TabContents* contents) { | 1926 void Browser::ConvertContentsToApplication(TabContents* contents) { |
1923 const GURL& url = contents->controller().GetActiveEntry()->url(); | 1927 const GURL& url = contents->controller().GetActiveEntry()->url(); |
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2647 | 2651 |
2648 // We need to register the window position pref. | 2652 // We need to register the window position pref. |
2649 std::wstring window_pref(prefs::kBrowserWindowPlacement); | 2653 std::wstring window_pref(prefs::kBrowserWindowPlacement); |
2650 window_pref.append(L"_"); | 2654 window_pref.append(L"_"); |
2651 window_pref.append(app_name); | 2655 window_pref.append(app_name); |
2652 PrefService* prefs = g_browser_process->local_state(); | 2656 PrefService* prefs = g_browser_process->local_state(); |
2653 DCHECK(prefs); | 2657 DCHECK(prefs); |
2654 | 2658 |
2655 prefs->RegisterDictionaryPref(window_pref.c_str()); | 2659 prefs->RegisterDictionaryPref(window_pref.c_str()); |
2656 } | 2660 } |
OLD | NEW |