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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 "http://www.google.com/support/chrome/"; | 149 "http://www.google.com/support/chrome/"; |
150 #endif | 150 #endif |
151 | 151 |
152 // The URL to be loaded to display the "Report a broken page" form. | 152 // The URL to be loaded to display the "Report a broken page" form. |
153 static const std::string kBrokenPageUrl = | 153 static const std::string kBrokenPageUrl = |
154 "http://www.google.com/support/chrome/bin/request.py?contact_type=" | 154 "http://www.google.com/support/chrome/bin/request.py?contact_type=" |
155 "broken_website&format=inproduct&p.page_title=$1&p.page_url=$2"; | 155 "broken_website&format=inproduct&p.page_title=$1&p.page_url=$2"; |
156 | 156 |
157 static const std::string kHashMark = "#"; | 157 static const std::string kHashMark = "#"; |
158 | 158 |
| 159 // The URL for the privacy dashboard. |
| 160 static const char kPrivacyDashboardUrl[] = "https://www.google.com/dashboard"; |
| 161 |
159 /////////////////////////////////////////////////////////////////////////////// | 162 /////////////////////////////////////////////////////////////////////////////// |
160 | 163 |
161 namespace { | 164 namespace { |
162 | 165 |
163 #if defined(OS_CHROMEOS) | 166 #if defined(OS_CHROMEOS) |
164 // If a popup window is bigger than this fraction of the screen on chrome os, | 167 // If a popup window is bigger than this fraction of the screen on chrome os, |
165 // turn it into a tab | 168 // turn it into a tab |
166 const float kPopupMaxWidthFactor = 0.5; | 169 const float kPopupMaxWidthFactor = 0.5; |
167 const float kPopupMaxHeightFactor = 0.6; | 170 const float kPopupMaxHeightFactor = 0.6; |
168 #endif | 171 #endif |
(...skipping 1749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1918 AddSelectedTabWithURL(help_url, PageTransition::AUTO_BOOKMARK); | 1921 AddSelectedTabWithURL(help_url, PageTransition::AUTO_BOOKMARK); |
1919 } | 1922 } |
1920 | 1923 |
1921 void Browser::OpenThemeGalleryTabAndActivate() { | 1924 void Browser::OpenThemeGalleryTabAndActivate() { |
1922 OpenURL(GURL(l10n_util::GetStringUTF8(IDS_THEMES_GALLERY_URL)), | 1925 OpenURL(GURL(l10n_util::GetStringUTF8(IDS_THEMES_GALLERY_URL)), |
1923 GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK); | 1926 GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK); |
1924 window_->Activate(); | 1927 window_->Activate(); |
1925 } | 1928 } |
1926 | 1929 |
1927 void Browser::OpenPrivacyDashboardTabAndActivate() { | 1930 void Browser::OpenPrivacyDashboardTabAndActivate() { |
1928 OpenURL(GURL(l10n_util::GetStringUTF8(IDS_PRIVACY_DASHBOARD_URL)), | 1931 OpenURL(GURL(kPrivacyDashboardUrl), GURL(), |
1929 GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK); | 1932 NEW_FOREGROUND_TAB, PageTransition::LINK); |
1930 window_->Activate(); | 1933 window_->Activate(); |
1931 } | 1934 } |
1932 | 1935 |
1933 void Browser::OpenAutoFillHelpTabAndActivate() { | 1936 void Browser::OpenAutoFillHelpTabAndActivate() { |
1934 OpenURL(GURL(l10n_util::GetStringUTF8(IDS_AUTOFILL_HELP_URL)), | 1937 OpenURL(GURL(l10n_util::GetStringUTF8(IDS_AUTOFILL_HELP_URL)), |
1935 GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK); | 1938 GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK); |
1936 window_->Activate(); | 1939 window_->Activate(); |
1937 } | 1940 } |
1938 | 1941 |
1939 void Browser::OpenSearchEngineOptionsDialog() { | 1942 void Browser::OpenSearchEngineOptionsDialog() { |
(...skipping 2369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4309 NOTREACHED(); | 4312 NOTREACHED(); |
4310 return false; | 4313 return false; |
4311 } | 4314 } |
4312 | 4315 |
4313 void Browser::CreateInstantIfNecessary() { | 4316 void Browser::CreateInstantIfNecessary() { |
4314 if (type() == TYPE_NORMAL && InstantController::IsEnabled(profile()) && | 4317 if (type() == TYPE_NORMAL && InstantController::IsEnabled(profile()) && |
4315 !profile()->IsOffTheRecord()) { | 4318 !profile()->IsOffTheRecord()) { |
4316 instant_.reset(new InstantController(profile_, this)); | 4319 instant_.reset(new InstantController(profile_, this)); |
4317 } | 4320 } |
4318 } | 4321 } |
OLD | NEW |