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 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 } | 518 } |
519 | 519 |
520 if (create_panel) { | 520 if (create_panel) { |
521 if (urls.empty()) | 521 if (urls.empty()) |
522 urls.push_back(GURL(chrome::kChromeUINewTabURL)); | 522 urls.push_back(GURL(chrome::kChromeUINewTabURL)); |
523 | 523 |
524 #if defined(USE_ASH) | 524 #if defined(USE_ASH) |
525 if (chrome::GetActiveDesktop() == chrome::HOST_DESKTOP_TYPE_ASH) { | 525 if (chrome::GetActiveDesktop() == chrome::HOST_DESKTOP_TYPE_ASH) { |
526 AppWindow::CreateParams create_params; | 526 AppWindow::CreateParams create_params; |
527 create_params.window_type = AppWindow::WINDOW_TYPE_V1_PANEL; | 527 create_params.window_type = AppWindow::WINDOW_TYPE_V1_PANEL; |
528 create_params.bounds = window_bounds; | 528 create_params.window_spec.bounds = window_bounds; |
529 create_params.focused = saw_focus_key && focused; | 529 create_params.focused = saw_focus_key && focused; |
530 AppWindow* app_window = new AppWindow( | 530 AppWindow* app_window = new AppWindow( |
531 window_profile, new ChromeAppWindowDelegate(), GetExtension()); | 531 window_profile, new ChromeAppWindowDelegate(), GetExtension()); |
532 AshPanelContents* ash_panel_contents = new AshPanelContents(app_window); | 532 AshPanelContents* ash_panel_contents = new AshPanelContents(app_window); |
533 app_window->Init(urls[0], ash_panel_contents, create_params); | 533 app_window->Init(urls[0], ash_panel_contents, create_params); |
534 SetResult(ash_panel_contents->GetExtensionWindowController()-> | 534 SetResult(ash_panel_contents->GetExtensionWindowController()-> |
535 CreateWindowValueWithTabs(GetExtension())); | 535 CreateWindowValueWithTabs(GetExtension())); |
536 return true; | 536 return true; |
537 } | 537 } |
538 #endif | 538 #endif |
(...skipping 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1907 execute_tab_id_ = tab_id; | 1907 execute_tab_id_ = tab_id; |
1908 details_ = details.Pass(); | 1908 details_ = details.Pass(); |
1909 return true; | 1909 return true; |
1910 } | 1910 } |
1911 | 1911 |
1912 bool TabsInsertCSSFunction::ShouldInsertCSS() const { | 1912 bool TabsInsertCSSFunction::ShouldInsertCSS() const { |
1913 return true; | 1913 return true; |
1914 } | 1914 } |
1915 | 1915 |
1916 } // namespace extensions | 1916 } // namespace extensions |
OLD | NEW |