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/time.h" | 7 #include "base/time.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chrome/browser/extensions/shell_window_registry.h" | 9 #include "chrome/browser/extensions/shell_window_registry.h" |
10 #include "chrome/browser/extensions/window_controller.h" | 10 #include "chrome/browser/extensions/window_controller.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
60 if (options) { | 60 if (options) { |
61 if (options->width.get()) | 61 if (options->width.get()) |
62 create_params.bounds.set_width(*options->width.get()); | 62 create_params.bounds.set_width(*options->width.get()); |
63 if (options->height.get()) | 63 if (options->height.get()) |
64 create_params.bounds.set_height(*options->height.get()); | 64 create_params.bounds.set_height(*options->height.get()); |
65 if (options->left.get()) | 65 if (options->left.get()) |
66 create_params.bounds.set_x(*options->left.get()); | 66 create_params.bounds.set_x(*options->left.get()); |
67 if (options->top.get()) | 67 if (options->top.get()) |
68 create_params.bounds.set_y(*options->top.get()); | 68 create_params.bounds.set_y(*options->top.get()); |
69 | 69 |
70 if (options->frame.get()) { | |
71 create_params.frame = *options->frame == kNoneFrameOption ? | |
72 ShellWindow::CreateParams::FRAME_NONE : | |
73 ShellWindow::CreateParams::FRAME_CHROME; | |
Mihai Parparita -not on Chrome
2012/08/31 23:12:56
Can you file a cleanup bug to remove support for F
jeremya
2012/09/01 01:42:30
Done. http://crbug.com/146100
| |
74 } | |
75 | |
76 gfx::Size& minimum_size = create_params.minimum_size; | 70 gfx::Size& minimum_size = create_params.minimum_size; |
77 if (options->min_width.get()) | 71 if (options->min_width.get()) |
78 minimum_size.set_width(*options->min_width); | 72 minimum_size.set_width(*options->min_width); |
79 if (options->min_height.get()) | 73 if (options->min_height.get()) |
80 minimum_size.set_height(*options->min_height); | 74 minimum_size.set_height(*options->min_height); |
81 gfx::Size& maximum_size = create_params.maximum_size; | 75 gfx::Size& maximum_size = create_params.maximum_size; |
82 if (options->max_width.get()) | 76 if (options->max_width.get()) |
83 maximum_size.set_width(*options->max_width); | 77 maximum_size.set_width(*options->max_width); |
84 if (options->max_height.get()) | 78 if (options->max_height.get()) |
85 maximum_size.set_height(*options->max_height); | 79 maximum_size.set_height(*options->max_height); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
127 window->GetBaseWindow()->Minimize(); | 121 window->GetBaseWindow()->Minimize(); |
128 return true; | 122 return true; |
129 } | 123 } |
130 | 124 |
131 bool AppWindowRestoreFunction::RunWithWindow(ShellWindow* window) { | 125 bool AppWindowRestoreFunction::RunWithWindow(ShellWindow* window) { |
132 window->GetBaseWindow()->Restore(); | 126 window->GetBaseWindow()->Restore(); |
133 return true; | 127 return true; |
134 } | 128 } |
135 | 129 |
136 } // namespace extensions | 130 } // namespace extensions |
OLD | NEW |