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 "mojo/shell/application_manager.h" | 5 #include "mojo/shell/application_manager.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 23 matching lines...) Expand all Loading... | |
34 class ApplicationManager::ContentHandlerConnection : public ErrorHandler { | 34 class ApplicationManager::ContentHandlerConnection : public ErrorHandler { |
35 public: | 35 public: |
36 ContentHandlerConnection(ApplicationManager* manager, | 36 ContentHandlerConnection(ApplicationManager* manager, |
37 const GURL& content_handler_url) | 37 const GURL& content_handler_url) |
38 : manager_(manager), content_handler_url_(content_handler_url) { | 38 : manager_(manager), content_handler_url_(content_handler_url) { |
39 ServiceProviderPtr services; | 39 ServiceProviderPtr services; |
40 manager->ConnectToApplication(content_handler_url, GURL(), | 40 manager->ConnectToApplication(content_handler_url, GURL(), |
41 GetProxy(&services), nullptr, | 41 GetProxy(&services), nullptr, |
42 base::Closure()); | 42 base::Closure()); |
43 MessagePipe pipe; | 43 MessagePipe pipe; |
44 content_handler_.Bind(pipe.handle0.Pass()); | 44 content_handler_.Bind(InterfacePtrInfo<ContentHandler>(pipe.handle0.Pass(), 0u)); |
sky
2015/05/08 19:08:02
nit: > 80.
Ken Rockot(use gerrit already)
2015/05/08 19:12:47
Fixed
| |
45 services->ConnectToService(ContentHandler::Name_, pipe.handle1.Pass()); | 45 services->ConnectToService(ContentHandler::Name_, pipe.handle1.Pass()); |
46 content_handler_.set_error_handler(this); | 46 content_handler_.set_error_handler(this); |
47 } | 47 } |
48 | 48 |
49 ContentHandler* content_handler() { return content_handler_.get(); } | 49 ContentHandler* content_handler() { return content_handler_.get(); } |
50 | 50 |
51 GURL content_handler_url() { return content_handler_url_; } | 51 GURL content_handler_url() { return content_handler_url_; } |
52 | 52 |
53 private: | 53 private: |
54 // ErrorHandler implementation: | 54 // ErrorHandler implementation: |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
481 return pipe.handle0.Pass(); | 481 return pipe.handle0.Pass(); |
482 } | 482 } |
483 | 483 |
484 void ApplicationManager::CleanupRunner(NativeRunner* runner) { | 484 void ApplicationManager::CleanupRunner(NativeRunner* runner) { |
485 native_runners_.erase( | 485 native_runners_.erase( |
486 std::find(native_runners_.begin(), native_runners_.end(), runner)); | 486 std::find(native_runners_.begin(), native_runners_.end(), runner)); |
487 } | 487 } |
488 | 488 |
489 } // namespace shell | 489 } // namespace shell |
490 } // namespace mojo | 490 } // namespace mojo |
OLD | NEW |