| 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 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 662 #if defined(OS_LINUX) || defined(OS_CHROMEOS) | 662 #if defined(OS_LINUX) || defined(OS_CHROMEOS) |
| 663 // On Desktop Linux, window managers may ignore hints until the X11 window is | 663 // On Desktop Linux, window managers may ignore hints until the X11 window is |
| 664 // mapped, which happens in the blocking call to Show() above. | 664 // mapped, which happens in the blocking call to Show() above. |
| 665 // DesktopWindowTreeHostX11 currently only checks for an attempt to maximize | 665 // DesktopWindowTreeHostX11 currently only checks for an attempt to maximize |
| 666 // once mapped, but not minimize or fullscreen. | 666 // once mapped, but not minimize or fullscreen. |
| 667 // For ChromeOS, manually Minimize(). Because minimzied window is not | 667 // For ChromeOS, manually Minimize(). Because minimzied window is not |
| 668 // considered to create new window. See http://crbug.com/473228. | 668 // considered to create new window. See http://crbug.com/473228. |
| 669 if (create_params.initial_show_state == ui::SHOW_STATE_MINIMIZED) | 669 if (create_params.initial_show_state == ui::SHOW_STATE_MINIMIZED) |
| 670 new_window->window()->Minimize(); | 670 new_window->window()->Minimize(); |
| 671 #endif | 671 #endif |
| 672 #if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_WIN) | 672 #if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) |
| 673 // On Desktop Linux and Windows, managers don't handle fullscreen state to | 673 // On Desktop Linux managers don't handle fullscreen state to |
| 674 // create window for now. | 674 // create window for now. |
| 675 if (create_params.initial_show_state == ui::SHOW_STATE_FULLSCREEN) | 675 if (create_params.initial_show_state == ui::SHOW_STATE_FULLSCREEN) |
| 676 controller->SetFullscreenMode(true, extension()->url()); | 676 controller->SetFullscreenMode(true, extension()->url()); |
| 677 #endif | 677 #endif |
| 678 | 678 |
| 679 if (new_window->profile()->IsOffTheRecord() && | 679 if (new_window->profile()->IsOffTheRecord() && |
| 680 !GetProfile()->IsOffTheRecord() && !include_incognito()) { | 680 !GetProfile()->IsOffTheRecord() && !include_incognito()) { |
| 681 // Don't expose incognito windows if extension itself works in non-incognito | 681 // Don't expose incognito windows if extension itself works in non-incognito |
| 682 // profile and CanCrossIncognito isn't allowed. | 682 // profile and CanCrossIncognito isn't allowed. |
| 683 SetResult(base::Value::CreateNullValue()); | 683 SetResult(base::Value::CreateNullValue()); |
| (...skipping 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2005 ZoomModeToZoomSettings(zoom_mode, &zoom_settings); | 2005 ZoomModeToZoomSettings(zoom_mode, &zoom_settings); |
| 2006 zoom_settings.default_zoom_factor.reset(new double( | 2006 zoom_settings.default_zoom_factor.reset(new double( |
| 2007 content::ZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel()))); | 2007 content::ZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel()))); |
| 2008 | 2008 |
| 2009 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings); | 2009 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings); |
| 2010 SendResponse(true); | 2010 SendResponse(true); |
| 2011 return true; | 2011 return true; |
| 2012 } | 2012 } |
| 2013 | 2013 |
| 2014 } // namespace extensions | 2014 } // namespace extensions |
| OLD | NEW |