| 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 <limits> | 5 #include <limits> |
| 6 #include <utility> | 6 #include <utility> |
| 7 | 7 |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 | 76 |
| 77 class BrowserTargetImpl : public mojom::BrowserTarget { | 77 class BrowserTargetImpl : public mojom::BrowserTarget { |
| 78 public: | 78 public: |
| 79 BrowserTargetImpl(base::RunLoop* run_loop, | 79 BrowserTargetImpl(base::RunLoop* run_loop, |
| 80 mojo::InterfaceRequest<mojom::BrowserTarget> request) | 80 mojo::InterfaceRequest<mojom::BrowserTarget> request) |
| 81 : run_loop_(run_loop), binding_(this, std::move(request)) {} | 81 : run_loop_(run_loop), binding_(this, std::move(request)) {} |
| 82 | 82 |
| 83 ~BrowserTargetImpl() override {} | 83 ~BrowserTargetImpl() override {} |
| 84 | 84 |
| 85 // mojom::BrowserTarget overrides: | 85 // mojom::BrowserTarget overrides: |
| 86 void Start(const StartCallback& closure) override { | 86 void Start(const mojo::Closure& closure) override { |
| 87 closure.Run(); | 87 closure.Run(); |
| 88 } | 88 } |
| 89 void Stop() override { | 89 void Stop() override { |
| 90 got_message = true; | 90 got_message = true; |
| 91 run_loop_->Quit(); | 91 run_loop_->Quit(); |
| 92 } | 92 } |
| 93 | 93 |
| 94 protected: | 94 protected: |
| 95 base::RunLoop* run_loop_; | 95 base::RunLoop* run_loop_; |
| 96 | 96 |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 NavigateToURL(other_shell, test_url); | 231 NavigateToURL(other_shell, test_url); |
| 232 // RunLoop is quit when message received from page. | 232 // RunLoop is quit when message received from page. |
| 233 other_run_loop.Run(); | 233 other_run_loop.Run(); |
| 234 EXPECT_TRUE(got_message); | 234 EXPECT_TRUE(got_message); |
| 235 EXPECT_EQ(shell()->web_contents()->GetRenderProcessHost(), | 235 EXPECT_EQ(shell()->web_contents()->GetRenderProcessHost(), |
| 236 other_shell->web_contents()->GetRenderProcessHost()); | 236 other_shell->web_contents()->GetRenderProcessHost()); |
| 237 } | 237 } |
| 238 | 238 |
| 239 } // namespace | 239 } // namespace |
| 240 } // namespace content | 240 } // namespace content |
| OLD | NEW |