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

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: Add widget->Show(), widget->Minimize() calls Created 5 years, 5 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 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « no previous file | ui/views/widget/native_widget_aura.cc » ('j') | ui/views/widget/native_widget_aura_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698