OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "apps/app_window.h" | 5 #include "apps/app_window.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 | 286 |
287 requested_alpha_enabled_ = new_params.alpha_enabled; | 287 requested_alpha_enabled_ = new_params.alpha_enabled; |
288 | 288 |
289 AppsClient* apps_client = AppsClient::Get(); | 289 AppsClient* apps_client = AppsClient::Get(); |
290 native_app_window_.reset( | 290 native_app_window_.reset( |
291 apps_client->CreateNativeAppWindow(this, new_params)); | 291 apps_client->CreateNativeAppWindow(this, new_params)); |
292 | 292 |
293 helper_.reset(new AppWebContentsHelper( | 293 helper_.reset(new AppWebContentsHelper( |
294 browser_context_, extension_id_, web_contents, app_delegate_.get())); | 294 browser_context_, extension_id_, web_contents, app_delegate_.get())); |
295 | 295 |
296 popup_manager_.reset( | |
297 new web_modal::PopupManager(GetWebContentsModalDialogHost())); | |
298 popup_manager_->RegisterWith(web_contents); | |
299 | |
300 // Prevent the browser process from shutting down while this window exists. | 296 // Prevent the browser process from shutting down while this window exists. |
301 apps_client->IncrementKeepAliveCount(); | 297 apps_client->IncrementKeepAliveCount(); |
302 UpdateExtensionAppIcon(); | 298 UpdateExtensionAppIcon(); |
303 AppWindowRegistry::Get(browser_context_)->AddAppWindow(this); | 299 AppWindowRegistry::Get(browser_context_)->AddAppWindow(this); |
304 | 300 |
305 if (new_params.hidden) { | 301 if (new_params.hidden) { |
306 // Although the window starts hidden by default, calling Hide() here | 302 // Although the window starts hidden by default, calling Hide() here |
307 // notifies observers of the window being hidden. | 303 // notifies observers of the window being hidden. |
308 Hide(); | 304 Hide(); |
309 } else { | 305 } else { |
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1103 region.bounds.x(), | 1099 region.bounds.x(), |
1104 region.bounds.y(), | 1100 region.bounds.y(), |
1105 region.bounds.right(), | 1101 region.bounds.right(), |
1106 region.bounds.bottom(), | 1102 region.bounds.bottom(), |
1107 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); | 1103 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); |
1108 } | 1104 } |
1109 return sk_region; | 1105 return sk_region; |
1110 } | 1106 } |
1111 | 1107 |
1112 } // namespace apps | 1108 } // namespace apps |
OLD | NEW |