Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: content/browser/webui/web_ui_mojo_browsertest.cc

Issue 289063015: Mojo: Remove SetClient from generated interfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/child/mojo/mojo_application.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | content/child/mojo/mojo_application.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698