| 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 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 if (!saw_focus_key && create_panel) | 653 if (!saw_focus_key && create_panel) |
| 654 focused = false; | 654 focused = false; |
| 655 | 655 |
| 656 if (focused) | 656 if (focused) |
| 657 new_window->window()->Show(); | 657 new_window->window()->Show(); |
| 658 else | 658 else |
| 659 new_window->window()->ShowInactive(); | 659 new_window->window()->ShowInactive(); |
| 660 | 660 |
| 661 WindowController* controller = new_window->extension_window_controller(); | 661 WindowController* controller = new_window->extension_window_controller(); |
| 662 | 662 |
| 663 #if defined(OS_CHROMEOS) | |
| 664 // For ChromeOS, manually Minimize(). Because minimzied window is not | |
| 665 // considered to create new window. See http://crbug.com/473228. | |
| 666 if (create_params.initial_show_state == ui::SHOW_STATE_MINIMIZED) | |
| 667 new_window->window()->Minimize(); | |
| 668 #endif | |
| 669 | |
| 670 if (new_window->profile()->IsOffTheRecord() && | 663 if (new_window->profile()->IsOffTheRecord() && |
| 671 !GetProfile()->IsOffTheRecord() && !include_incognito()) { | 664 !GetProfile()->IsOffTheRecord() && !include_incognito()) { |
| 672 // Don't expose incognito windows if extension itself works in non-incognito | 665 // Don't expose incognito windows if extension itself works in non-incognito |
| 673 // profile and CanCrossIncognito isn't allowed. | 666 // profile and CanCrossIncognito isn't allowed. |
| 674 SetResult(base::Value::CreateNullValue()); | 667 SetResult(base::Value::CreateNullValue()); |
| 675 } else { | 668 } else { |
| 676 SetResult(controller->CreateWindowValueWithTabs(extension())); | 669 SetResult(controller->CreateWindowValueWithTabs(extension())); |
| 677 } | 670 } |
| 678 | 671 |
| 679 return true; | 672 return true; |
| (...skipping 1312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1992 ZoomModeToZoomSettings(zoom_mode, &zoom_settings); | 1985 ZoomModeToZoomSettings(zoom_mode, &zoom_settings); |
| 1993 zoom_settings.default_zoom_factor.reset(new double( | 1986 zoom_settings.default_zoom_factor.reset(new double( |
| 1994 content::ZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel()))); | 1987 content::ZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel()))); |
| 1995 | 1988 |
| 1996 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings); | 1989 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings); |
| 1997 SendResponse(true); | 1990 SendResponse(true); |
| 1998 return true; | 1991 return true; |
| 1999 } | 1992 } |
| 2000 | 1993 |
| 2001 } // namespace extensions | 1994 } // namespace extensions |
| OLD | NEW |