Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: chrome/browser/extensions/api/tabs/tabs_api.cc

Issue 1159703006: Remove the exceptional cases to support the minimized and fullscreen state (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_CHROMEOS)
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.
665 // DesktopWindowTreeHostX11 currently only checks for an attempt to maximize
666 // once mapped, but not minimize or fullscreen.
667 // For ChromeOS, manually Minimize(). Because minimzied window is not 663 // For ChromeOS, manually Minimize(). Because minimzied window is not
668 // considered to create new window. See http://crbug.com/473228. 664 // considered to create new window. See http://crbug.com/473228.
669 if (create_params.initial_show_state == ui::SHOW_STATE_MINIMIZED) 665 if (create_params.initial_show_state == ui::SHOW_STATE_MINIMIZED)
670 new_window->window()->Minimize(); 666 new_window->window()->Minimize();
671 #endif 667 #endif
672 #if (defined(OS_LINUX) && !defined(OS_CHROMEOS))
673 // On Desktop Linux managers don't handle fullscreen state to
674 // create window for now.
675 if (create_params.initial_show_state == ui::SHOW_STATE_FULLSCREEN)
676 controller->SetFullscreenMode(true, extension()->url());
677 #endif
678 668
679 if (new_window->profile()->IsOffTheRecord() && 669 if (new_window->profile()->IsOffTheRecord() &&
680 !GetProfile()->IsOffTheRecord() && !include_incognito()) { 670 !GetProfile()->IsOffTheRecord() && !include_incognito()) {
681 // Don't expose incognito windows if extension itself works in non-incognito 671 // Don't expose incognito windows if extension itself works in non-incognito
682 // profile and CanCrossIncognito isn't allowed. 672 // profile and CanCrossIncognito isn't allowed.
683 SetResult(base::Value::CreateNullValue()); 673 SetResult(base::Value::CreateNullValue());
684 } else { 674 } else {
685 SetResult(controller->CreateWindowValueWithTabs(extension())); 675 SetResult(controller->CreateWindowValueWithTabs(extension()));
686 } 676 }
687 677
(...skipping 1317 matching lines...) Expand 10 before | Expand all | Expand 10 after
2005 ZoomModeToZoomSettings(zoom_mode, &zoom_settings); 1995 ZoomModeToZoomSettings(zoom_mode, &zoom_settings);
2006 zoom_settings.default_zoom_factor.reset(new double( 1996 zoom_settings.default_zoom_factor.reset(new double(
2007 content::ZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel()))); 1997 content::ZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel())));
2008 1998
2009 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings); 1999 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings);
2010 SendResponse(true); 2000 SendResponse(true);
2011 return true; 2001 return true;
2012 } 2002 }
2013 2003
2014 } // namespace extensions 2004 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698