| 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 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 create_params.window_type = AppWindow::WINDOW_TYPE_V1_PANEL; | 566 create_params.window_type = AppWindow::WINDOW_TYPE_V1_PANEL; |
| 567 create_params.window_key = extension_id; | 567 create_params.window_key = extension_id; |
| 568 create_params.window_spec.bounds = window_bounds; | 568 create_params.window_spec.bounds = window_bounds; |
| 569 create_params.focused = saw_focus_key && focused; | 569 create_params.focused = saw_focus_key && focused; |
| 570 AppWindow* app_window = new AppWindow( | 570 AppWindow* app_window = new AppWindow( |
| 571 window_profile, | 571 window_profile, |
| 572 new ChromeAppDelegate(make_scoped_ptr(new ScopedKeepAlive)), | 572 new ChromeAppDelegate(make_scoped_ptr(new ScopedKeepAlive)), |
| 573 extension()); | 573 extension()); |
| 574 AshPanelContents* ash_panel_contents = new AshPanelContents(app_window); | 574 AshPanelContents* ash_panel_contents = new AshPanelContents(app_window); |
| 575 app_window->Init(urls[0], ash_panel_contents, create_params); | 575 app_window->Init(urls[0], ash_panel_contents, create_params); |
| 576 SetResult(ash_panel_contents->GetExtensionWindowController() | 576 SetResult(ash_panel_contents->GetWindowController() |
| 577 ->CreateWindowValueWithTabs(extension())); | 577 ->CreateWindowValueWithTabs(extension())); |
| 578 return true; | 578 return true; |
| 579 } | 579 } |
| 580 #endif | 580 #endif |
| 581 std::string title = | 581 std::string title = |
| 582 web_app::GenerateApplicationNameFromExtensionId(extension_id); | 582 web_app::GenerateApplicationNameFromExtensionId(extension_id); |
| 583 // Note: Panels ignore all but the first url provided. | 583 // Note: Panels ignore all but the first url provided. |
| 584 Panel* panel = PanelManager::GetInstance()->CreatePanel( | 584 Panel* panel = PanelManager::GetInstance()->CreatePanel( |
| 585 title, window_profile, urls[0], window_bounds, panel_create_mode); | 585 title, window_profile, urls[0], window_bounds, panel_create_mode); |
| 586 | 586 |
| (...skipping 1406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1993 ZoomModeToZoomSettings(zoom_mode, &zoom_settings); | 1993 ZoomModeToZoomSettings(zoom_mode, &zoom_settings); |
| 1994 zoom_settings.default_zoom_factor.reset(new double( | 1994 zoom_settings.default_zoom_factor.reset(new double( |
| 1995 content::ZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel()))); | 1995 content::ZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel()))); |
| 1996 | 1996 |
| 1997 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings); | 1997 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings); |
| 1998 SendResponse(true); | 1998 SendResponse(true); |
| 1999 return true; | 1999 return true; |
| 2000 } | 2000 } |
| 2001 | 2001 |
| 2002 } // namespace extensions | 2002 } // namespace extensions |
| OLD | NEW |