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/ui/extensions/shell_window.h" | 5 #include "chrome/browser/ui/extensions/shell_window.h" |
6 | 6 |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chrome/browser/extensions/app_window_contents.h" | 9 #include "chrome/browser/extensions/app_window_contents.h" |
10 #include "chrome/browser/extensions/extension_process_manager.h" | 10 #include "chrome/browser/extensions/extension_process_manager.h" |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 bounds.set_height(maximum_size.height()); | 157 bounds.set_height(maximum_size.height()); |
158 if (bounds.height() != INT_MIN && bounds.height() < minimum_size.height()) | 158 if (bounds.height() != INT_MIN && bounds.height() < minimum_size.height()) |
159 bounds.set_height(minimum_size.height()); | 159 bounds.set_height(minimum_size.height()); |
160 | 160 |
161 new_params.bounds = bounds; | 161 new_params.bounds = bounds; |
162 | 162 |
163 native_app_window_.reset(NativeAppWindow::Create(this, new_params)); | 163 native_app_window_.reset(NativeAppWindow::Create(this, new_params)); |
164 OnNativeWindowChanged(); | 164 OnNativeWindowChanged(); |
165 | 165 |
166 if (!params.hidden) { | 166 if (!params.hidden) { |
167 if (params.window_type == WINDOW_TYPE_PANEL) | 167 if (window_type_is_panel()) |
168 GetBaseWindow()->ShowInactive(); // Panels are not activated by default. | 168 GetBaseWindow()->ShowInactive(); // Panels are not activated by default. |
169 else | 169 else |
170 GetBaseWindow()->Show(); | 170 GetBaseWindow()->Show(); |
171 } | 171 } |
172 | 172 |
173 shell_window_contents_->LoadContents(params.creator_process_id); | 173 shell_window_contents_->LoadContents(params.creator_process_id); |
174 | 174 |
175 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, | 175 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, |
176 content::Source<Profile>(profile_)); | 176 content::Source<Profile>(profile_)); |
177 // Close when the browser is exiting. | 177 // Close when the browser is exiting. |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 const extensions::DraggableRegion& region = *iter; | 512 const extensions::DraggableRegion& region = *iter; |
513 sk_region->op( | 513 sk_region->op( |
514 region.bounds.x(), | 514 region.bounds.x(), |
515 region.bounds.y(), | 515 region.bounds.y(), |
516 region.bounds.right(), | 516 region.bounds.right(), |
517 region.bounds.bottom(), | 517 region.bounds.bottom(), |
518 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); | 518 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); |
519 } | 519 } |
520 return sk_region; | 520 return sk_region; |
521 } | 521 } |
OLD | NEW |