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 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 // Create a new BrowserWindow. | 557 // Create a new BrowserWindow. |
558 chrome::HostDesktopType host_desktop_type = chrome::GetActiveDesktop(); | 558 chrome::HostDesktopType host_desktop_type = chrome::GetActiveDesktop(); |
559 if (create_panel) | 559 if (create_panel) |
560 window_type = Browser::TYPE_POPUP; | 560 window_type = Browser::TYPE_POPUP; |
561 Browser::CreateParams create_params(window_type, window_profile, | 561 Browser::CreateParams create_params(window_type, window_profile, |
562 host_desktop_type); | 562 host_desktop_type); |
563 if (extension_id.empty()) { | 563 if (extension_id.empty()) { |
564 create_params.initial_bounds = window_bounds; | 564 create_params.initial_bounds = window_bounds; |
565 } else { | 565 } else { |
566 create_params = Browser::CreateParams::CreateForApp( | 566 create_params = Browser::CreateParams::CreateForApp( |
567 window_type, | 567 Browser::TYPE_POPUP, |
568 web_app::GenerateApplicationNameFromExtensionId(extension_id), | 568 web_app::GenerateApplicationNameFromExtensionId(extension_id), |
569 window_bounds, | 569 window_bounds, |
570 window_profile, | 570 window_profile, |
571 host_desktop_type); | 571 host_desktop_type); |
572 } | 572 } |
573 create_params.initial_show_state = ui::SHOW_STATE_NORMAL; | 573 create_params.initial_show_state = ui::SHOW_STATE_NORMAL; |
574 create_params.host_desktop_type = chrome::GetActiveDesktop(); | 574 create_params.host_desktop_type = chrome::GetActiveDesktop(); |
575 | 575 |
576 Browser* new_window = CreateBrowserWindow(create_params, window_profile, | 576 Browser* new_window = CreateBrowserWindow(create_params, window_profile, |
577 extension_id); | 577 extension_id); |
(...skipping 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1911 execute_tab_id_ = tab_id; | 1911 execute_tab_id_ = tab_id; |
1912 details_ = details.Pass(); | 1912 details_ = details.Pass(); |
1913 return true; | 1913 return true; |
1914 } | 1914 } |
1915 | 1915 |
1916 bool TabsInsertCSSFunction::ShouldInsertCSS() const { | 1916 bool TabsInsertCSSFunction::ShouldInsertCSS() const { |
1917 return true; | 1917 return true; |
1918 } | 1918 } |
1919 | 1919 |
1920 } // namespace extensions | 1920 } // namespace extensions |
OLD | NEW |