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

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: fix test failures Created 5 years, 2 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 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 if (!saw_focus_key && create_panel) 677 if (!saw_focus_key && create_panel)
678 focused = false; 678 focused = false;
679 679
680 if (focused) 680 if (focused)
681 new_window->window()->Show(); 681 new_window->window()->Show();
682 else 682 else
683 new_window->window()->ShowInactive(); 683 new_window->window()->ShowInactive();
684 684
685 WindowController* controller = new_window->extension_window_controller(); 685 WindowController* controller = new_window->extension_window_controller();
686 686
687 #if defined(OS_CHROMEOS)
688 // For ChromeOS, manually Minimize(). Because minimzied window is not
689 // considered to create new window. See http://crbug.com/473228.
690 if (create_params.initial_show_state == ui::SHOW_STATE_MINIMIZED)
691 new_window->window()->Minimize();
692 #endif
693
694 if (new_window->profile()->IsOffTheRecord() && 687 if (new_window->profile()->IsOffTheRecord() &&
695 !GetProfile()->IsOffTheRecord() && !include_incognito()) { 688 !GetProfile()->IsOffTheRecord() && !include_incognito()) {
696 // Don't expose incognito windows if extension itself works in non-incognito 689 // Don't expose incognito windows if extension itself works in non-incognito
697 // profile and CanCrossIncognito isn't allowed. 690 // profile and CanCrossIncognito isn't allowed.
698 SetResult(base::Value::CreateNullValue()); 691 SetResult(base::Value::CreateNullValue());
699 } else { 692 } else {
700 SetResult(controller->CreateWindowValueWithTabs(extension())); 693 SetResult(controller->CreateWindowValueWithTabs(extension()));
701 } 694 }
702 695
703 return true; 696 return true;
(...skipping 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after
2049 ZoomModeToZoomSettings(zoom_mode, &zoom_settings); 2042 ZoomModeToZoomSettings(zoom_mode, &zoom_settings);
2050 zoom_settings.default_zoom_factor.reset(new double( 2043 zoom_settings.default_zoom_factor.reset(new double(
2051 content::ZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel()))); 2044 content::ZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel())));
2052 2045
2053 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings); 2046 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings);
2054 SendResponse(true); 2047 SendResponse(true);
2055 return true; 2048 return true;
2056 } 2049 }
2057 2050
2058 } // namespace extensions 2051 } // 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