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 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 base::RefCountedString* ref_contents = new base::RefCountedString; | 50 base::RefCountedString* ref_contents = new base::RefCountedString; |
51 ref_contents->data() = contents; | 51 ref_contents->data() = contents; |
52 callback.Run(ref_contents); | 52 callback.Run(ref_contents); |
53 return true; | 53 return true; |
54 } | 54 } |
55 | 55 |
56 class BrowserTargetImpl : public BrowserTarget { | 56 class BrowserTargetImpl : public BrowserTarget { |
57 public: | 57 public: |
58 BrowserTargetImpl(mojo::ScopedMessagePipeHandle handle, | 58 BrowserTargetImpl(mojo::ScopedMessagePipeHandle handle, |
59 base::RunLoop* run_loop) | 59 base::RunLoop* run_loop) |
60 : renderer_(mojo::MakeProxy<RendererTarget>(handle.Pass())), | 60 : run_loop_(run_loop) { |
61 run_loop_(run_loop) { | 61 renderer_.Bind(handle.Pass()); |
62 renderer_->SetClient(this); | 62 renderer_.set_client(this); |
63 } | 63 } |
64 | 64 |
65 virtual ~BrowserTargetImpl() {} | 65 virtual ~BrowserTargetImpl() {} |
66 | 66 |
67 // BrowserTarget overrides: | 67 // BrowserTarget overrides: |
68 virtual void PingResponse() OVERRIDE { | 68 virtual void PingResponse() OVERRIDE { |
69 NOTREACHED(); | 69 NOTREACHED(); |
70 } | 70 } |
71 | 71 |
72 protected: | 72 protected: |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 factory()->set_run_loop(&run_loop); | 209 factory()->set_run_loop(&run_loop); |
210 GURL test_url(test_server()->GetURL("files/web_ui_mojo.html?ping")); | 210 GURL test_url(test_server()->GetURL("files/web_ui_mojo.html?ping")); |
211 NavigateToURL(shell(), test_url); | 211 NavigateToURL(shell(), test_url); |
212 // RunLoop is quit when message received from page. | 212 // RunLoop is quit when message received from page. |
213 run_loop.Run(); | 213 run_loop.Run(); |
214 EXPECT_TRUE(got_message); | 214 EXPECT_TRUE(got_message); |
215 } | 215 } |
216 | 216 |
217 } // namespace | 217 } // namespace |
218 } // namespace content | 218 } // namespace content |
OLD | NEW |