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 <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 } | 375 } |
376 | 376 |
377 content::RenderFrameHost* created_frame = | 377 content::RenderFrameHost* created_frame = |
378 app_window->web_contents()->GetMainFrame(); | 378 app_window->web_contents()->GetMainFrame(); |
379 int frame_id = MSG_ROUTING_NONE; | 379 int frame_id = MSG_ROUTING_NONE; |
380 if (create_params.creator_process_id == created_frame->GetProcess()->GetID()) | 380 if (create_params.creator_process_id == created_frame->GetProcess()->GetID()) |
381 frame_id = created_frame->GetRoutingID(); | 381 frame_id = created_frame->GetRoutingID(); |
382 | 382 |
383 std::unique_ptr<base::DictionaryValue> result(new base::DictionaryValue); | 383 std::unique_ptr<base::DictionaryValue> result(new base::DictionaryValue); |
384 result->Set("frameId", new base::Value(frame_id)); | 384 result->Set("frameId", new base::Value(frame_id)); |
385 result->Set("id", new base::StringValue(app_window->window_key())); | 385 result->Set("id", new base::Value(app_window->window_key())); |
386 app_window->GetSerializedState(result.get()); | 386 app_window->GetSerializedState(result.get()); |
387 SetResult(std::move(result)); | 387 SetResult(std::move(result)); |
388 | 388 |
389 if (AppWindowRegistry::Get(browser_context()) | 389 if (AppWindowRegistry::Get(browser_context()) |
390 ->HadDevToolsAttached(app_window->web_contents())) { | 390 ->HadDevToolsAttached(app_window->web_contents())) { |
391 AppWindowClient::Get()->OpenDevToolsWindow( | 391 AppWindowClient::Get()->OpenDevToolsWindow( |
392 app_window->web_contents(), | 392 app_window->web_contents(), |
393 base::Bind(&AppWindowCreateFunction::SendResponse, this, true)); | 393 base::Bind(&AppWindowCreateFunction::SendResponse, this, true)); |
394 return true; | 394 return true; |
395 } | 395 } |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 | 574 |
575 if (options.frame->as_frame_options->inactive_color.get()) { | 575 if (options.frame->as_frame_options->inactive_color.get()) { |
576 error_ = app_window_constants::kInactiveColorWithoutColor; | 576 error_ = app_window_constants::kInactiveColorWithoutColor; |
577 return false; | 577 return false; |
578 } | 578 } |
579 | 579 |
580 return true; | 580 return true; |
581 } | 581 } |
582 | 582 |
583 } // namespace extensions | 583 } // namespace extensions |
OLD | NEW |