| 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 "extensions/browser/app_window/app_window.h" | 5 #include "extensions/browser/app_window/app_window.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 requested_alpha_enabled_(false), | 254 requested_alpha_enabled_(false), |
| 255 is_ime_window_(false), | 255 is_ime_window_(false), |
| 256 image_loader_ptr_factory_(this) { | 256 image_loader_ptr_factory_(this) { |
| 257 ExtensionsBrowserClient* client = ExtensionsBrowserClient::Get(); | 257 ExtensionsBrowserClient* client = ExtensionsBrowserClient::Get(); |
| 258 CHECK(!client->IsGuestSession(context) || context->IsOffTheRecord()) | 258 CHECK(!client->IsGuestSession(context) || context->IsOffTheRecord()) |
| 259 << "Only off the record window may be opened in the guest mode."; | 259 << "Only off the record window may be opened in the guest mode."; |
| 260 } | 260 } |
| 261 | 261 |
| 262 void AppWindow::Init(const GURL& url, | 262 void AppWindow::Init(const GURL& url, |
| 263 AppWindowContents* app_window_contents, | 263 AppWindowContents* app_window_contents, |
| 264 content::RenderFrameHost* creator_frame, |
| 264 const CreateParams& params) { | 265 const CreateParams& params) { |
| 265 // Initialize the render interface and web contents | 266 // Initialize the render interface and web contents |
| 266 app_window_contents_.reset(app_window_contents); | 267 app_window_contents_.reset(app_window_contents); |
| 267 app_window_contents_->Initialize(browser_context(), url); | 268 app_window_contents_->Initialize(browser_context(), creator_frame, url); |
| 268 | 269 |
| 269 initial_url_ = url; | 270 initial_url_ = url; |
| 270 | 271 |
| 271 content::WebContentsObserver::Observe(web_contents()); | 272 content::WebContentsObserver::Observe(web_contents()); |
| 272 SetViewType(web_contents(), VIEW_TYPE_APP_WINDOW); | 273 SetViewType(web_contents(), VIEW_TYPE_APP_WINDOW); |
| 273 app_delegate_->InitWebContents(web_contents()); | 274 app_delegate_->InitWebContents(web_contents()); |
| 274 | 275 |
| 275 ExtensionWebContentsObserver::GetForWebContents(web_contents())-> | 276 ExtensionWebContentsObserver::GetForWebContents(web_contents())-> |
| 276 dispatcher()->set_delegate(this); | 277 dispatcher()->set_delegate(this); |
| 277 | 278 |
| (...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1116 region.bounds.x(), | 1117 region.bounds.x(), |
| 1117 region.bounds.y(), | 1118 region.bounds.y(), |
| 1118 region.bounds.right(), | 1119 region.bounds.right(), |
| 1119 region.bounds.bottom(), | 1120 region.bounds.bottom(), |
| 1120 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); | 1121 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); |
| 1121 } | 1122 } |
| 1122 return sk_region; | 1123 return sk_region; |
| 1123 } | 1124 } |
| 1124 | 1125 |
| 1125 } // namespace extensions | 1126 } // namespace extensions |
| OLD | NEW |