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 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 } | 501 } |
502 } | 502 } |
503 | 503 |
504 if (create_panel) { | 504 if (create_panel) { |
505 if (urls.empty()) | 505 if (urls.empty()) |
506 urls.push_back(GURL(chrome::kChromeUINewTabURL)); | 506 urls.push_back(GURL(chrome::kChromeUINewTabURL)); |
507 | 507 |
508 #if defined(USE_ASH) | 508 #if defined(USE_ASH) |
509 if (chrome::GetActiveDesktop() == chrome::HOST_DESKTOP_TYPE_ASH) { | 509 if (chrome::GetActiveDesktop() == chrome::HOST_DESKTOP_TYPE_ASH) { |
510 AppWindow::CreateParams create_params; | 510 AppWindow::CreateParams create_params; |
511 create_params.window_type = AppWindow::WINDOW_TYPE_V1_PANEL; | 511 create_params.window_type = native_app_window::WINDOW_TYPE_V1_PANEL; |
512 create_params.window_spec.bounds = window_bounds; | 512 create_params.window_spec.bounds = window_bounds; |
513 create_params.focused = saw_focus_key && focused; | 513 create_params.focused = saw_focus_key && focused; |
514 AppWindow* app_window = new AppWindow( | 514 AppWindow* app_window = new AppWindow( |
515 window_profile, | 515 window_profile, |
516 new ChromeAppDelegate(make_scoped_ptr(new ScopedKeepAlive)), | 516 new ChromeAppDelegate(make_scoped_ptr(new ScopedKeepAlive)), |
517 extension()); | 517 extension()); |
518 AshPanelContents* ash_panel_contents = new AshPanelContents(app_window); | 518 AshPanelContents* ash_panel_contents = new AshPanelContents(app_window); |
519 app_window->Init(urls[0], ash_panel_contents, create_params); | 519 app_window->Init(urls[0], ash_panel_contents, create_params); |
520 SetResult(ash_panel_contents->GetExtensionWindowController() | 520 SetResult(ash_panel_contents->GetExtensionWindowController() |
521 ->CreateWindowValueWithTabs(extension())); | 521 ->CreateWindowValueWithTabs(extension())); |
(...skipping 1406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1928 ZoomController::ZoomMode zoom_mode = zoom_controller->zoom_mode(); | 1928 ZoomController::ZoomMode zoom_mode = zoom_controller->zoom_mode(); |
1929 api::tabs::ZoomSettings zoom_settings; | 1929 api::tabs::ZoomSettings zoom_settings; |
1930 ZoomModeToZoomSettings(zoom_mode, &zoom_settings); | 1930 ZoomModeToZoomSettings(zoom_mode, &zoom_settings); |
1931 | 1931 |
1932 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings); | 1932 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings); |
1933 SendResponse(true); | 1933 SendResponse(true); |
1934 return true; | 1934 return true; |
1935 } | 1935 } |
1936 | 1936 |
1937 } // namespace extensions | 1937 } // namespace extensions |
OLD | NEW |