Chromium Code Reviews| 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 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 652 if (!saw_focus_key && create_panel) | 652 if (!saw_focus_key && create_panel) |
| 653 focused = false; | 653 focused = false; |
| 654 | 654 |
| 655 if (focused) | 655 if (focused) |
| 656 new_window->window()->Show(); | 656 new_window->window()->Show(); |
| 657 else | 657 else |
| 658 new_window->window()->ShowInactive(); | 658 new_window->window()->ShowInactive(); |
| 659 | 659 |
| 660 WindowController* controller = new_window->extension_window_controller(); | 660 WindowController* controller = new_window->extension_window_controller(); |
| 661 | 661 |
| 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. |
|
tapted
2015/05/26 23:25:30
I think minimize was added to DWTHX11's ShowWindow
joone
2015/05/27 17:50:21
Can I create a separated CL for the Desktop Linux
| |
| 667 // For ChromeOS, manually Minimize(). Because minimzied window is not | |
| 668 // considered to create new window. See http://crbug.com/473228. | |
| 669 if (create_params.initial_show_state == ui::SHOW_STATE_MINIMIZED) | 667 if (create_params.initial_show_state == ui::SHOW_STATE_MINIMIZED) |
| 670 new_window->window()->Minimize(); | 668 new_window->window()->Minimize(); |
| 671 #endif | 669 #endif |
| 672 #if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) | 670 #if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) |
| 673 // On Desktop Linux managers don't handle fullscreen state to | 671 // On Desktop Linux managers don't handle fullscreen state to |
| 674 // create window for now. | 672 // create window for now. |
| 675 if (create_params.initial_show_state == ui::SHOW_STATE_FULLSCREEN) | 673 if (create_params.initial_show_state == ui::SHOW_STATE_FULLSCREEN) |
| 676 controller->SetFullscreenMode(true, extension()->url()); | 674 controller->SetFullscreenMode(true, extension()->url()); |
| 677 #endif | 675 #endif |
| 678 | 676 |
| (...skipping 1326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2005 ZoomModeToZoomSettings(zoom_mode, &zoom_settings); | 2003 ZoomModeToZoomSettings(zoom_mode, &zoom_settings); |
| 2006 zoom_settings.default_zoom_factor.reset(new double( | 2004 zoom_settings.default_zoom_factor.reset(new double( |
| 2007 content::ZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel()))); | 2005 content::ZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel()))); |
| 2008 | 2006 |
| 2009 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings); | 2007 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings); |
| 2010 SendResponse(true); | 2008 SendResponse(true); |
| 2011 return true; | 2009 return true; |
| 2012 } | 2010 } |
| 2013 | 2011 |
| 2014 } // namespace extensions | 2012 } // namespace extensions |
| OLD | NEW |