| 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 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 | 596 |
| 597 if (create_panel) { | 597 if (create_panel) { |
| 598 if (urls.empty()) | 598 if (urls.empty()) |
| 599 urls.push_back(GURL(chrome::kChromeUINewTabURL)); | 599 urls.push_back(GURL(chrome::kChromeUINewTabURL)); |
| 600 | 600 |
| 601 #if defined(OS_CHROMEOS) | 601 #if defined(OS_CHROMEOS) |
| 602 if (PanelManager::ShouldUsePanels(extension_id)) { | 602 if (PanelManager::ShouldUsePanels(extension_id)) { |
| 603 ShellWindow::CreateParams create_params; | 603 ShellWindow::CreateParams create_params; |
| 604 create_params.window_type = ShellWindow::WINDOW_TYPE_V1_PANEL; | 604 create_params.window_type = ShellWindow::WINDOW_TYPE_V1_PANEL; |
| 605 create_params.bounds = window_bounds; | 605 create_params.bounds = window_bounds; |
| 606 create_params.minimum_size = window_bounds.size(); | |
| 607 create_params.maximum_size = window_bounds.size(); | |
| 608 create_params.focused = saw_focus_key && focused; | 606 create_params.focused = saw_focus_key && focused; |
| 609 ShellWindow* shell_window = | 607 ShellWindow* shell_window = |
| 610 new ShellWindow(window_profile, GetExtension()); | 608 new ShellWindow(window_profile, GetExtension()); |
| 611 AshPanelContents* ash_panel_contents = new AshPanelContents(shell_window); | 609 AshPanelContents* ash_panel_contents = new AshPanelContents(shell_window); |
| 612 shell_window->Init(urls[0], ash_panel_contents, create_params); | 610 shell_window->Init(urls[0], ash_panel_contents, create_params); |
| 613 SetResult(ash_panel_contents->GetExtensionWindowController()-> | 611 SetResult(ash_panel_contents->GetExtensionWindowController()-> |
| 614 CreateWindowValueWithTabs(GetExtension())); | 612 CreateWindowValueWithTabs(GetExtension())); |
| 615 // Add the panel to the shell window registry so that it shows up in | 613 // Add the panel to the shell window registry so that it shows up in |
| 616 // the launcher and as an active render process. | 614 // the launcher and as an active render process. |
| 617 extensions::ShellWindowRegistry::Get(window_profile)->AddShellWindow( | 615 extensions::ShellWindowRegistry::Get(window_profile)->AddShellWindow( |
| (...skipping 1545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2163 extension->id(), | 2161 extension->id(), |
| 2164 script_type, | 2162 script_type, |
| 2165 code_string, | 2163 code_string, |
| 2166 frame_scope, | 2164 frame_scope, |
| 2167 run_at, | 2165 run_at, |
| 2168 ScriptExecutor::ISOLATED_WORLD, | 2166 ScriptExecutor::ISOLATED_WORLD, |
| 2169 false /* is_web_view */, | 2167 false /* is_web_view */, |
| 2170 base::Bind(&ExecuteCodeInTabFunction::OnExecuteCodeFinished, this)); | 2168 base::Bind(&ExecuteCodeInTabFunction::OnExecuteCodeFinished, this)); |
| 2171 return true; | 2169 return true; |
| 2172 } | 2170 } |
| OLD | NEW |