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 1433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1444 } | 1444 } |
1445 | 1445 |
1446 void Browser::ShowFirstRunBubble() { | 1446 void Browser::ShowFirstRunBubble() { |
1447 window()->GetLocationBar()->ShowFirstRunBubble(); | 1447 window()->GetLocationBar()->ShowFirstRunBubble(); |
1448 } | 1448 } |
1449 | 1449 |
1450 /////////////////////////////////////////////////////////////////////////////// | 1450 /////////////////////////////////////////////////////////////////////////////// |
1451 // Browser, protected: | 1451 // Browser, protected: |
1452 | 1452 |
1453 BrowserWindow* Browser::CreateBrowserWindow() { | 1453 BrowserWindow* Browser::CreateBrowserWindow() { |
1454 bool create_panel = false; | 1454 #if !defined(USE_ASH) |
1455 #if defined(USE_ASH) | 1455 if (is_type_panel()) |
1456 if (CommandLine::ForCurrentProcess()->HasSwitch( | 1456 return PanelManager::GetInstance()->CreatePanel(this)->browser_window(); |
1457 ash::switches::kAuraPanelManager)) | |
1458 create_panel = is_type_panel(); | |
1459 #elif !defined(OS_CHROMEOS) | |
1460 create_panel = is_type_panel(); | |
1461 #endif | 1457 #endif |
1462 if (create_panel) | |
1463 return PanelManager::GetInstance()->CreatePanel(this)->browser_window(); | |
1464 | |
1465 return BrowserWindow::CreateBrowserWindow(this); | 1458 return BrowserWindow::CreateBrowserWindow(this); |
1466 } | 1459 } |
1467 | 1460 |
1468 /////////////////////////////////////////////////////////////////////////////// | 1461 /////////////////////////////////////////////////////////////////////////////// |
1469 // Browser, content::WebContentsDelegate implementation: | 1462 // Browser, content::WebContentsDelegate implementation: |
1470 | 1463 |
1471 WebContents* Browser::OpenURLFromTab(WebContents* source, | 1464 WebContents* Browser::OpenURLFromTab(WebContents* source, |
1472 const OpenURLParams& params) { | 1465 const OpenURLParams& params) { |
1473 chrome::NavigateParams nav_params(this, params.url, params.transition); | 1466 chrome::NavigateParams nav_params(this, params.url, params.transition); |
1474 nav_params.source_contents = chrome::GetTabContentsAt(this, | 1467 nav_params.source_contents = chrome::GetTabContentsAt(this, |
(...skipping 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2816 if (contents && !allow_js_access) { | 2809 if (contents && !allow_js_access) { |
2817 contents->web_contents()->GetController().LoadURL( | 2810 contents->web_contents()->GetController().LoadURL( |
2818 target_url, | 2811 target_url, |
2819 content::Referrer(), | 2812 content::Referrer(), |
2820 content::PAGE_TRANSITION_LINK, | 2813 content::PAGE_TRANSITION_LINK, |
2821 std::string()); // No extra headers. | 2814 std::string()); // No extra headers. |
2822 } | 2815 } |
2823 | 2816 |
2824 return contents != NULL; | 2817 return contents != NULL; |
2825 } | 2818 } |
OLD | NEW |