| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/ui/browser.h" | 5 #include "chrome/browser/ui/browser.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #include <shellapi.h> | 9 #include <shellapi.h> |
| 10 #endif // defined(OS_WIN) | 10 #endif // defined(OS_WIN) |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 using content::WebContents; | 216 using content::WebContents; |
| 217 using extensions::Extension; | 217 using extensions::Extension; |
| 218 using ui::WebDialogDelegate; | 218 using ui::WebDialogDelegate; |
| 219 using web_modal::WebContentsModalDialogManager; | 219 using web_modal::WebContentsModalDialogManager; |
| 220 using WebKit::WebWindowFeatures; | 220 using WebKit::WebWindowFeatures; |
| 221 | 221 |
| 222 /////////////////////////////////////////////////////////////////////////////// | 222 /////////////////////////////////////////////////////////////////////////////// |
| 223 | 223 |
| 224 namespace { | 224 namespace { |
| 225 | 225 |
| 226 // The URL to be loaded to display the "Report a broken page" form. | |
| 227 const char kBrokenPageUrl[] = | |
| 228 "https://www.google.com/support/chrome/bin/request.py?contact_type=" | |
| 229 "broken_website&format=inproduct&p.page_title=$1&p.page_url=$2"; | |
| 230 | |
| 231 // How long we wait before updating the browser chrome while loading a page. | 226 // How long we wait before updating the browser chrome while loading a page. |
| 232 const int kUIUpdateCoalescingTimeMS = 200; | 227 const int kUIUpdateCoalescingTimeMS = 200; |
| 233 | 228 |
| 234 BrowserWindow* CreateBrowserWindow(Browser* browser) { | 229 BrowserWindow* CreateBrowserWindow(Browser* browser) { |
| 235 return BrowserWindow::CreateBrowserWindow(browser); | 230 return BrowserWindow::CreateBrowserWindow(browser); |
| 236 } | 231 } |
| 237 | 232 |
| 238 // Is the fast tab unload experiment enabled? | 233 // Is the fast tab unload experiment enabled? |
| 239 bool IsFastTabUnloadEnabled() { | 234 bool IsFastTabUnloadEnabled() { |
| 240 return CommandLine::ForCurrentProcess()->HasSwitch( | 235 return CommandLine::ForCurrentProcess()->HasSwitch( |
| (...skipping 2051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2292 if (contents && !allow_js_access) { | 2287 if (contents && !allow_js_access) { |
| 2293 contents->web_contents()->GetController().LoadURL( | 2288 contents->web_contents()->GetController().LoadURL( |
| 2294 target_url, | 2289 target_url, |
| 2295 content::Referrer(), | 2290 content::Referrer(), |
| 2296 content::PAGE_TRANSITION_LINK, | 2291 content::PAGE_TRANSITION_LINK, |
| 2297 std::string()); // No extra headers. | 2292 std::string()); // No extra headers. |
| 2298 } | 2293 } |
| 2299 | 2294 |
| 2300 return contents != NULL; | 2295 return contents != NULL; |
| 2301 } | 2296 } |
| OLD | NEW |