Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "blimp/engine/testing/session/blimp_engine_testing_session.h" | |
| 6 | |
| 7 #include <iostream> | |
| 8 #include <string> | |
| 9 #include <utility> | |
| 10 | |
| 11 #include "base/command_line.h" | |
| 12 #include "base/memory/ptr_util.h" | |
| 13 #include "base/trace_event/trace_event.h" | |
| 14 #include "blimp/common/create_blimp_message.h" | |
| 15 #include "blimp/common/proto/tab_control.pb.h" | |
| 16 #include "blimp/engine/session/blimp_engine_session.h" | |
| 17 #include "blimp/engine/session/tab.h" | |
| 18 #include "blimp/net/null_blimp_message_processor.h" | |
| 19 #include "content/public/browser/browser_url_handler.h" | |
| 20 #include "content/public/browser/navigation_controller.h" | |
| 21 #include "content/public/browser/navigation_entry.h" | |
| 22 #include "content/public/browser/web_contents.h" | |
| 23 #include "net/base/net_errors.h" | |
| 24 #include "ui/aura/env.h" | |
| 25 #include "ui/aura/window.h" | |
| 26 #include "ui/aura/window_tree_host.h" | |
| 27 #include "ui/gfx/geometry/size.h" | |
|
Kevin M
2017/01/09 20:17:18
That's a lot of includes. :) Can you trim them dow
shenghuazhang
2017/01/10 23:20:50
Done.
| |
| 28 | |
| 29 namespace blimp { | |
| 30 namespace engine { | |
| 31 | |
| 32 BlimpEngineTestingSession::BlimpEngineTestingSession( | |
| 33 std::unique_ptr<BlimpBrowserContext> browser_context, | |
| 34 net::NetLog* net_log, | |
| 35 BlimpEngineConfig* engine_config, | |
| 36 SettingsManager* settings_manager) | |
| 37 : BlimpEngineSession(std::move(browser_context), | |
| 38 net_log, | |
| 39 engine_config, | |
| 40 settings_manager){}; | |
| 41 | |
| 42 void BlimpEngineTestingSession::ProcessMessage( | |
| 43 std::unique_ptr<BlimpMessage> message, | |
| 44 const net::CompletionCallback& callback) { | |
| 45 if (message->has_navigation() && | |
| 46 message->navigation().type() == NavigationMessage::LOAD_URL) { | |
| 47 GURL url = GURL(message->navigation().load_url().url()); | |
| 48 message->mutable_navigation()->mutable_load_url()->set_url(url.spec()); | |
| 49 } | |
| 50 BlimpEngineSession::ProcessMessage(std::move(message), callback); | |
| 51 } | |
| 52 | |
| 53 } // namespace engine | |
| 54 } // namespace blimp | |
| OLD | NEW |