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

Side by Side Diff: chrome/browser/dom_ui/app_launcher_handler.cc

Issue 1730013: fullscreen window app launch container (Closed)
Patch Set: added tests Created 10 years, 7 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 | « chrome/browser/browser_init.cc ('k') | chrome/common/extensions/extension.h » ('j') | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/dom_ui/app_launcher_handler.h" 5 #include "chrome/browser/dom_ui/app_launcher_handler.h"
6 6
7 #include "app/resource_bundle.h" 7 #include "app/resource_bundle.h"
8 #include "base/base64.h" 8 #include "base/base64.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 NOTREACHED(); 118 NOTREACHED();
119 return; 119 return;
120 } 120 }
121 121
122 Profile* profile = extensions_service_->profile(); 122 Profile* profile = extensions_service_->profile();
123 if (launch_container.empty()) { 123 if (launch_container.empty()) {
124 Browser::OpenApplication(profile, extension_id); 124 Browser::OpenApplication(profile, extension_id);
125 return; 125 return;
126 } 126 }
127 127
128 // Override the default launch container.
128 Extension* extension = 129 Extension* extension =
129 extensions_service_->GetExtensionById(extension_id, false); 130 extensions_service_->GetExtensionById(extension_id, false);
130 DCHECK(extension); 131 DCHECK(extension);
131 132
133 Extension::LaunchContainer container;
132 if (launch_container == "tab") 134 if (launch_container == "tab")
133 Browser::OpenApplicationTab(profile, extension); 135 container = Extension::LAUNCH_TAB;
134 else if (launch_container == "panel") 136 else if (launch_container == "panel")
135 Browser::OpenApplicationWindow(profile, extension, GURL(), true); 137 container = Extension::LAUNCH_PANEL;
136 else if (launch_container == "window") 138 else if (launch_container == "window")
137 Browser::OpenApplicationWindow(profile, extension, GURL(), false); 139 container = Extension::LAUNCH_WINDOW;
138 else 140 else
139 NOTREACHED() << "Unexpected launch container: " << launch_container << "."; 141 NOTREACHED() << "Unexpected launch container: " << launch_container << ".";
142
143 Browser::OpenApplication(profile, extension, container);
140 } 144 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_init.cc ('k') | chrome/common/extensions/extension.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698