| 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/extensions/api/tabs/tabs_api.h" | 5 #include "chrome/browser/extensions/api/tabs/tabs_api.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 if (urls.empty()) | 581 if (urls.empty()) |
| 582 urls.push_back(GURL(chrome::kChromeUINewTabURL)); | 582 urls.push_back(GURL(chrome::kChromeUINewTabURL)); |
| 583 | 583 |
| 584 #if defined(OS_CHROMEOS) | 584 #if defined(OS_CHROMEOS) |
| 585 if (PanelManager::ShouldUsePanels(extension_id)) { | 585 if (PanelManager::ShouldUsePanels(extension_id)) { |
| 586 ShellWindow::CreateParams create_params; | 586 ShellWindow::CreateParams create_params; |
| 587 create_params.window_type = ShellWindow::WINDOW_TYPE_V1_PANEL; | 587 create_params.window_type = ShellWindow::WINDOW_TYPE_V1_PANEL; |
| 588 create_params.bounds = window_bounds; | 588 create_params.bounds = window_bounds; |
| 589 create_params.focused = saw_focus_key && focused; | 589 create_params.focused = saw_focus_key && focused; |
| 590 ShellWindow* shell_window = new ShellWindow( | 590 ShellWindow* shell_window = new ShellWindow( |
| 591 window_profile, new chrome::ChromeShellWindowDelegate(), | 591 window_profile, new ChromeShellWindowDelegate(), |
| 592 GetExtension()); | 592 GetExtension()); |
| 593 AshPanelContents* ash_panel_contents = new AshPanelContents(shell_window); | 593 AshPanelContents* ash_panel_contents = new AshPanelContents(shell_window); |
| 594 shell_window->Init(urls[0], ash_panel_contents, create_params); | 594 shell_window->Init(urls[0], ash_panel_contents, create_params); |
| 595 SetResult(ash_panel_contents->GetExtensionWindowController()-> | 595 SetResult(ash_panel_contents->GetExtensionWindowController()-> |
| 596 CreateWindowValueWithTabs(GetExtension())); | 596 CreateWindowValueWithTabs(GetExtension())); |
| 597 return true; | 597 return true; |
| 598 } | 598 } |
| 599 #else | 599 #else |
| 600 std::string title = | 600 std::string title = |
| 601 web_app::GenerateApplicationNameFromExtensionId(extension_id); | 601 web_app::GenerateApplicationNameFromExtensionId(extension_id); |
| (...skipping 1463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2065 execute_tab_id_ = tab_id; | 2065 execute_tab_id_ = tab_id; |
| 2066 details_ = details.Pass(); | 2066 details_ = details.Pass(); |
| 2067 return true; | 2067 return true; |
| 2068 } | 2068 } |
| 2069 | 2069 |
| 2070 bool TabsInsertCSSFunction::ShouldInsertCSS() const { | 2070 bool TabsInsertCSSFunction::ShouldInsertCSS() const { |
| 2071 return true; | 2071 return true; |
| 2072 } | 2072 } |
| 2073 | 2073 |
| 2074 } // namespace extensions | 2074 } // namespace extensions |
| OLD | NEW |