OLD | NEW |
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/app_window/app_window_api.h" | 5 #include "chrome/browser/extensions/api/app_window/app_window_api.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/time.h" | 8 #include "base/time.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/browser/devtools/devtools_window.h" | 10 #include "chrome/browser/devtools/devtools_window.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 SendResponse(true); | 81 SendResponse(true); |
82 } | 82 } |
83 | 83 |
84 bool AppWindowCreateFunction::RunImpl() { | 84 bool AppWindowCreateFunction::RunImpl() { |
85 scoped_ptr<Create::Params> params(Create::Params::Create(*args_)); | 85 scoped_ptr<Create::Params> params(Create::Params::Create(*args_)); |
86 EXTENSION_FUNCTION_VALIDATE(params.get()); | 86 EXTENSION_FUNCTION_VALIDATE(params.get()); |
87 | 87 |
88 GURL url = GetExtension()->GetResourceURL(params->url); | 88 GURL url = GetExtension()->GetResourceURL(params->url); |
89 // Allow absolute URLs for component apps, otherwise prepend the extension | 89 // Allow absolute URLs for component apps, otherwise prepend the extension |
90 // path. | 90 // path. |
91 if (GetExtension()->location() == extensions::Extension::COMPONENT) { | 91 if (GetExtension()->location() == extensions::Manifest::COMPONENT) { |
92 GURL absolute = GURL(params->url); | 92 GURL absolute = GURL(params->url); |
93 if (absolute.has_scheme()) | 93 if (absolute.has_scheme()) |
94 url = absolute; | 94 url = absolute; |
95 } | 95 } |
96 | 96 |
97 bool inject_html_titlebar = false; | 97 bool inject_html_titlebar = false; |
98 | 98 |
99 // TODO(jeremya): figure out a way to pass the opening WebContents through to | 99 // TODO(jeremya): figure out a way to pass the opening WebContents through to |
100 // ShellWindow::Create so we can set the opener at create time rather than | 100 // ShellWindow::Create so we can set the opener at create time rather than |
101 // with a hack in AppWindowCustomBindings::GetView(). | 101 // with a hack in AppWindowCustomBindings::GetView(). |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 if (ShellWindowRegistry::Get(profile())->HadDevToolsAttached(created_view)) { | 240 if (ShellWindowRegistry::Get(profile())->HadDevToolsAttached(created_view)) { |
241 new DevToolsRestorer(this, created_view); | 241 new DevToolsRestorer(this, created_view); |
242 return true; | 242 return true; |
243 } | 243 } |
244 | 244 |
245 SendResponse(true); | 245 SendResponse(true); |
246 return true; | 246 return true; |
247 } | 247 } |
248 | 248 |
249 } // namespace extensions | 249 } // namespace extensions |
OLD | NEW |