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/extensions/window_controller.h" | 10 #include "chrome/browser/extensions/window_controller.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
87 switches::kEnableExperimentalExtensionApis)) { | 87 switches::kEnableExperimentalExtensionApis)) { |
88 create_params.frame = ShellWindow::CreateParams::FRAME_NONE; | 88 create_params.frame = ShellWindow::CreateParams::FRAME_NONE; |
89 inject_html_titlebar = true; | 89 inject_html_titlebar = true; |
90 } else if (*options->frame == kNoneFrameOption) { | 90 } else if (*options->frame == kNoneFrameOption) { |
91 create_params.frame = ShellWindow::CreateParams::FRAME_NONE; | 91 create_params.frame = ShellWindow::CreateParams::FRAME_NONE; |
92 } else { | 92 } else { |
93 create_params.frame = ShellWindow::CreateParams::FRAME_CHROME; | 93 create_params.frame = ShellWindow::CreateParams::FRAME_CHROME; |
94 } | 94 } |
95 } | 95 } |
96 | 96 |
97 if (options->transparent_background.get() && | |
98 CommandLine::ForCurrentProcess()->HasSwitch( | |
Mihai Parparita -not on Chrome
2012/09/28 19:15:34
This should check if the extension has the "experi
Bernie
2012/10/01 18:47:24
Ok. Could you point me at any existing code to per
Mihai Parparita -not on Chrome
2012/10/01 20:04:58
Something like: http://code.google.com/searchframe
Bernie
2012/10/10 21:05:01
Done.
| |
99 switches::kEnableExperimentalExtensionApis)) { | |
100 create_params.transparent_background = *options->transparent_background; | |
101 } | |
102 | |
97 gfx::Size& minimum_size = create_params.minimum_size; | 103 gfx::Size& minimum_size = create_params.minimum_size; |
98 if (options->min_width.get()) | 104 if (options->min_width.get()) |
99 minimum_size.set_width(*options->min_width); | 105 minimum_size.set_width(*options->min_width); |
100 if (options->min_height.get()) | 106 if (options->min_height.get()) |
101 minimum_size.set_height(*options->min_height); | 107 minimum_size.set_height(*options->min_height); |
102 gfx::Size& maximum_size = create_params.maximum_size; | 108 gfx::Size& maximum_size = create_params.maximum_size; |
103 if (options->max_width.get()) | 109 if (options->max_width.get()) |
104 maximum_size.set_width(*options->max_width); | 110 maximum_size.set_width(*options->max_width); |
105 if (options->max_height.get()) | 111 if (options->max_height.get()) |
106 maximum_size.set_height(*options->max_height); | 112 maximum_size.set_height(*options->max_height); |
(...skipping 26 matching lines...) Expand all Loading... | |
133 base::DictionaryValue* result = new base::DictionaryValue; | 139 base::DictionaryValue* result = new base::DictionaryValue; |
134 result->Set("viewId", base::Value::CreateIntegerValue(view_id)); | 140 result->Set("viewId", base::Value::CreateIntegerValue(view_id)); |
135 result->Set("injectTitlebar", | 141 result->Set("injectTitlebar", |
136 base::Value::CreateBooleanValue(inject_html_titlebar)); | 142 base::Value::CreateBooleanValue(inject_html_titlebar)); |
137 result->Set("id", base::Value::CreateStringValue(shell_window->window_key())); | 143 result->Set("id", base::Value::CreateStringValue(shell_window->window_key())); |
138 SetResult(result); | 144 SetResult(result); |
139 return true; | 145 return true; |
140 } | 146 } |
141 | 147 |
142 } // namespace extensions | 148 } // namespace extensions |
OLD | NEW |