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

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

Issue 1130033003: Make the minimize state work when creating a chrome window in CrOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: a patch for testing the launcher bug 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
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_CHROMEOS)
663 // For ChromeOS, manually Minimize(). Because minimzied window is not
664 // considered to create new window. See http://crbug.com/473228.
665 if (create_params.initial_show_state == ui::SHOW_STATE_MINIMIZED)
666 new_window->window()->Minimize();
667 #endif
668
669 if (new_window->profile()->IsOffTheRecord() && 662 if (new_window->profile()->IsOffTheRecord() &&
670 !GetProfile()->IsOffTheRecord() && !include_incognito()) { 663 !GetProfile()->IsOffTheRecord() && !include_incognito()) {
671 // Don't expose incognito windows if extension itself works in non-incognito 664 // Don't expose incognito windows if extension itself works in non-incognito
672 // profile and CanCrossIncognito isn't allowed. 665 // profile and CanCrossIncognito isn't allowed.
673 SetResult(base::Value::CreateNullValue()); 666 SetResult(base::Value::CreateNullValue());
674 } else { 667 } else {
675 SetResult(controller->CreateWindowValueWithTabs(extension())); 668 SetResult(controller->CreateWindowValueWithTabs(extension()));
676 } 669 }
677 670
678 return true; 671 return true;
(...skipping 1316 matching lines...) Expand 10 before | Expand all | Expand 10 after
1995 ZoomModeToZoomSettings(zoom_mode, &zoom_settings); 1988 ZoomModeToZoomSettings(zoom_mode, &zoom_settings);
1996 zoom_settings.default_zoom_factor.reset(new double( 1989 zoom_settings.default_zoom_factor.reset(new double(
1997 content::ZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel()))); 1990 content::ZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel())));
1998 1991
1999 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings); 1992 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings);
2000 SendResponse(true); 1993 SendResponse(true);
2001 return true; 1994 return true;
2002 } 1995 }
2003 1996
2004 } // namespace extensions 1997 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | ui/views/widget/native_widget_aura.cc » ('j') | ui/views/widget/native_widget_aura.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698