| 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 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 &focused)); | 591 &focused)); |
| 592 saw_focus_key = true; | 592 saw_focus_key = true; |
| 593 } | 593 } |
| 594 } | 594 } |
| 595 | 595 |
| 596 if (window_type == Browser::TYPE_PANEL) { | 596 if (window_type == Browser::TYPE_PANEL) { |
| 597 #if defined(OS_CHROMEOS) | 597 #if defined(OS_CHROMEOS) |
| 598 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnablePanels) && | 598 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnablePanels) && |
| 599 PanelManager::ShouldUsePanels(extension_id)) { | 599 PanelManager::ShouldUsePanels(extension_id)) { |
| 600 ShellWindow::CreateParams create_params; | 600 ShellWindow::CreateParams create_params; |
| 601 create_params.window_type = ShellWindow::WINDOW_TYPE_PANEL; | 601 create_params.window_type = ShellWindow::WINDOW_TYPE_V1_PANEL; |
| 602 create_params.bounds = window_bounds; | 602 create_params.bounds = window_bounds; |
| 603 create_params.minimum_size = window_bounds.size(); | 603 create_params.minimum_size = window_bounds.size(); |
| 604 create_params.maximum_size = window_bounds.size(); | 604 create_params.maximum_size = window_bounds.size(); |
| 605 ShellWindow* shell_window = | 605 ShellWindow* shell_window = |
| 606 new ShellWindow(window_profile, GetExtension()); | 606 new ShellWindow(window_profile, GetExtension()); |
| 607 AshPanelContents* ash_panel_contents = new AshPanelContents(shell_window); | 607 AshPanelContents* ash_panel_contents = new AshPanelContents(shell_window); |
| 608 shell_window->Init(urls[0], ash_panel_contents, create_params); | 608 shell_window->Init(urls[0], ash_panel_contents, create_params); |
| 609 SetResult(ash_panel_contents->GetExtensionWindowController()-> | 609 SetResult(ash_panel_contents->GetExtensionWindowController()-> |
| 610 CreateWindowValueWithTabs(GetExtension())); | 610 CreateWindowValueWithTabs(GetExtension())); |
| 611 // Add the panel to the shell window registry so that it shows up in | 611 // Add the panel to the shell window registry so that it shows up in |
| (...skipping 1537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2149 extension->id(), | 2149 extension->id(), |
| 2150 script_type, | 2150 script_type, |
| 2151 code_string, | 2151 code_string, |
| 2152 frame_scope, | 2152 frame_scope, |
| 2153 run_at, | 2153 run_at, |
| 2154 ScriptExecutor::ISOLATED_WORLD, | 2154 ScriptExecutor::ISOLATED_WORLD, |
| 2155 false /* is_web_view */, | 2155 false /* is_web_view */, |
| 2156 base::Bind(&ExecuteCodeInTabFunction::OnExecuteCodeFinished, this)); | 2156 base::Bind(&ExecuteCodeInTabFunction::OnExecuteCodeFinished, this)); |
| 2157 return true; | 2157 return true; |
| 2158 } | 2158 } |
| OLD | NEW |