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 <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 window_type_(WINDOW_TYPE_DEFAULT), | 235 window_type_(WINDOW_TYPE_DEFAULT), |
236 app_delegate_(app_delegate), | 236 app_delegate_(app_delegate), |
237 fullscreen_types_(FULLSCREEN_TYPE_NONE), | 237 fullscreen_types_(FULLSCREEN_TYPE_NONE), |
238 show_on_first_paint_(false), | 238 show_on_first_paint_(false), |
239 first_paint_complete_(false), | 239 first_paint_complete_(false), |
240 has_been_shown_(false), | 240 has_been_shown_(false), |
241 can_send_events_(false), | 241 can_send_events_(false), |
242 is_hidden_(false), | 242 is_hidden_(false), |
243 cached_always_on_top_(false), | 243 cached_always_on_top_(false), |
244 requested_alpha_enabled_(false), | 244 requested_alpha_enabled_(false), |
| 245 is_ime_window_(false), |
245 image_loader_ptr_factory_(this) { | 246 image_loader_ptr_factory_(this) { |
246 ExtensionsBrowserClient* client = ExtensionsBrowserClient::Get(); | 247 ExtensionsBrowserClient* client = ExtensionsBrowserClient::Get(); |
247 CHECK(!client->IsGuestSession(context) || context->IsOffTheRecord()) | 248 CHECK(!client->IsGuestSession(context) || context->IsOffTheRecord()) |
248 << "Only off the record window may be opened in the guest mode."; | 249 << "Only off the record window may be opened in the guest mode."; |
249 } | 250 } |
250 | 251 |
251 void AppWindow::Init(const GURL& url, | 252 void AppWindow::Init(const GURL& url, |
252 AppWindowContents* app_window_contents, | 253 AppWindowContents* app_window_contents, |
253 const CreateParams& params) { | 254 const CreateParams& params) { |
254 // Initialize the render interface and web contents | 255 // Initialize the render interface and web contents |
(...skipping 15 matching lines...) Expand all Loading... |
270 window_type_ = new_params.window_type; | 271 window_type_ = new_params.window_type; |
271 window_key_ = new_params.window_key; | 272 window_key_ = new_params.window_key; |
272 | 273 |
273 // Windows cannot be always-on-top in fullscreen mode for security reasons. | 274 // Windows cannot be always-on-top in fullscreen mode for security reasons. |
274 cached_always_on_top_ = new_params.always_on_top; | 275 cached_always_on_top_ = new_params.always_on_top; |
275 if (new_params.state == ui::SHOW_STATE_FULLSCREEN) | 276 if (new_params.state == ui::SHOW_STATE_FULLSCREEN) |
276 new_params.always_on_top = false; | 277 new_params.always_on_top = false; |
277 | 278 |
278 requested_alpha_enabled_ = new_params.alpha_enabled; | 279 requested_alpha_enabled_ = new_params.alpha_enabled; |
279 | 280 |
| 281 is_ime_window_ = params.is_ime_window; |
| 282 |
280 AppWindowClient* app_window_client = AppWindowClient::Get(); | 283 AppWindowClient* app_window_client = AppWindowClient::Get(); |
281 native_app_window_.reset( | 284 native_app_window_.reset( |
282 app_window_client->CreateNativeAppWindow(this, &new_params)); | 285 app_window_client->CreateNativeAppWindow(this, &new_params)); |
283 | 286 |
284 helper_.reset(new AppWebContentsHelper( | 287 helper_.reset(new AppWebContentsHelper( |
285 browser_context_, extension_id_, web_contents(), app_delegate_.get())); | 288 browser_context_, extension_id_, web_contents(), app_delegate_.get())); |
286 | 289 |
287 popup_manager_.reset( | 290 popup_manager_.reset( |
288 new web_modal::PopupManager(GetWebContentsModalDialogHost())); | 291 new web_modal::PopupManager(GetWebContentsModalDialogHost())); |
289 popup_manager_->RegisterWith(web_contents()); | 292 popup_manager_->RegisterWith(web_contents()); |
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1111 region.bounds.x(), | 1114 region.bounds.x(), |
1112 region.bounds.y(), | 1115 region.bounds.y(), |
1113 region.bounds.right(), | 1116 region.bounds.right(), |
1114 region.bounds.bottom(), | 1117 region.bounds.bottom(), |
1115 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); | 1118 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); |
1116 } | 1119 } |
1117 return sk_region; | 1120 return sk_region; |
1118 } | 1121 } |
1119 | 1122 |
1120 } // namespace extensions | 1123 } // namespace extensions |
OLD | NEW |