| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 // OS_WIN | 10 #endif // OS_WIN |
| (...skipping 3375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3386 BrowserWindow* Browser::CreateBrowserWindow() { | 3386 BrowserWindow* Browser::CreateBrowserWindow() { |
| 3387 bool create_panel = false; | 3387 bool create_panel = false; |
| 3388 #if defined(USE_ASH) | 3388 #if defined(USE_ASH) |
| 3389 if (CommandLine::ForCurrentProcess()->HasSwitch( | 3389 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 3390 ash::switches::kAuraPanelManager)) | 3390 ash::switches::kAuraPanelManager)) |
| 3391 create_panel = is_type_panel(); | 3391 create_panel = is_type_panel(); |
| 3392 #elif !defined(OS_CHROMEOS) | 3392 #elif !defined(OS_CHROMEOS) |
| 3393 create_panel = is_type_panel(); | 3393 create_panel = is_type_panel(); |
| 3394 #endif | 3394 #endif |
| 3395 if (create_panel) | 3395 if (create_panel) |
| 3396 return PanelManager::GetInstance()->CreatePanel(this); | 3396 return PanelManager::GetInstance()->CreatePanel(this)->browser_window(); |
| 3397 | 3397 |
| 3398 return BrowserWindow::CreateBrowserWindow(this); | 3398 return BrowserWindow::CreateBrowserWindow(this); |
| 3399 } | 3399 } |
| 3400 | 3400 |
| 3401 /////////////////////////////////////////////////////////////////////////////// | 3401 /////////////////////////////////////////////////////////////////////////////// |
| 3402 // Browser, content::WebContentsDelegate implementation: | 3402 // Browser, content::WebContentsDelegate implementation: |
| 3403 | 3403 |
| 3404 WebContents* Browser::OpenURLFromTab(WebContents* source, | 3404 WebContents* Browser::OpenURLFromTab(WebContents* source, |
| 3405 const OpenURLParams& params) { | 3405 const OpenURLParams& params) { |
| 3406 browser::NavigateParams nav_params(this, params.url, params.transition); | 3406 browser::NavigateParams nav_params(this, params.url, params.transition); |
| (...skipping 2018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5425 if (contents && !allow_js_access) { | 5425 if (contents && !allow_js_access) { |
| 5426 contents->web_contents()->GetController().LoadURL( | 5426 contents->web_contents()->GetController().LoadURL( |
| 5427 target_url, | 5427 target_url, |
| 5428 content::Referrer(), | 5428 content::Referrer(), |
| 5429 content::PAGE_TRANSITION_LINK, | 5429 content::PAGE_TRANSITION_LINK, |
| 5430 std::string()); // No extra headers. | 5430 std::string()); // No extra headers. |
| 5431 } | 5431 } |
| 5432 | 5432 |
| 5433 return contents != NULL; | 5433 return contents != NULL; |
| 5434 } | 5434 } |
| OLD | NEW |