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 "extensions/browser/api/app_window/app_window_api.h" | 5 #include "extensions/browser/api/app_window/app_window_api.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 break; | 333 break; |
334 } | 334 } |
335 } | 335 } |
336 } | 336 } |
337 | 337 |
338 create_params.creator_process_id = | 338 create_params.creator_process_id = |
339 render_frame_host()->GetProcess()->GetID(); | 339 render_frame_host()->GetProcess()->GetID(); |
340 | 340 |
341 AppWindow* app_window = | 341 AppWindow* app_window = |
342 AppWindowClient::Get()->CreateAppWindow(browser_context(), extension()); | 342 AppWindowClient::Get()->CreateAppWindow(browser_context(), extension()); |
343 app_window->Init(url, new AppWindowContentsImpl(app_window), create_params); | 343 app_window->Init(url, new AppWindowContentsImpl(app_window), |
| 344 render_frame_host(), create_params); |
344 | 345 |
345 if (ExtensionsBrowserClient::Get()->IsRunningInForcedAppMode() && | 346 if (ExtensionsBrowserClient::Get()->IsRunningInForcedAppMode() && |
346 !app_window->is_ime_window()) { | 347 !app_window->is_ime_window()) { |
347 app_window->ForcedFullscreen(); | 348 app_window->ForcedFullscreen(); |
348 } | 349 } |
349 | 350 |
350 content::RenderFrameHost* created_frame = | 351 content::RenderFrameHost* created_frame = |
351 app_window->web_contents()->GetMainFrame(); | 352 app_window->web_contents()->GetMainFrame(); |
352 int frame_id = MSG_ROUTING_NONE; | 353 int frame_id = MSG_ROUTING_NONE; |
353 if (create_params.creator_process_id == created_frame->GetProcess()->GetID()) | 354 if (create_params.creator_process_id == created_frame->GetProcess()->GetID()) |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
548 | 549 |
549 if (options.frame->as_frame_options->inactive_color.get()) { | 550 if (options.frame->as_frame_options->inactive_color.get()) { |
550 error_ = app_window_constants::kInactiveColorWithoutColor; | 551 error_ = app_window_constants::kInactiveColorWithoutColor; |
551 return false; | 552 return false; |
552 } | 553 } |
553 | 554 |
554 return true; | 555 return true; |
555 } | 556 } |
556 | 557 |
557 } // namespace extensions | 558 } // namespace extensions |
OLD | NEW |