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

Side by Side Diff: mojo/services/html_viewer/html_viewer.cc

Issue 975973002: Update mojo sdk to rev f68e697e389943cd9bf9652397312280e96b127a (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: shake fist at msvc Created 5 years, 9 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
« no previous file with comments | « no previous file | third_party/mojo/mojo_edk_system_impl.gypi » ('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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 const String& url) override { 80 const String& url) override {
81 ServiceProviderPtr service_provider; 81 ServiceProviderPtr service_provider;
82 shell_ = shell.Pass(); 82 shell_ = shell.Pass();
83 shell_->ConnectToApplication("mojo:network_service", 83 shell_->ConnectToApplication("mojo:network_service",
84 GetProxy(&service_provider), nullptr); 84 GetProxy(&service_provider), nullptr);
85 ConnectToService(service_provider.get(), &network_service_); 85 ConnectToService(service_provider.get(), &network_service_);
86 } 86 }
87 87
88 void AcceptConnection(const String& requestor_url, 88 void AcceptConnection(const String& requestor_url,
89 InterfaceRequest<ServiceProvider> services, 89 InterfaceRequest<ServiceProvider> services,
90 ServiceProviderPtr exposed_services) override { 90 ServiceProviderPtr exposed_services,
91 const String& url) override {
91 if (initial_response_) { 92 if (initial_response_) {
92 OnResponseReceived(URLLoaderPtr(), services.Pass(), 93 OnResponseReceived(URLLoaderPtr(), services.Pass(),
93 initial_response_.Pass()); 94 initial_response_.Pass());
94 } else { 95 } else {
95 URLLoaderPtr loader; 96 URLLoaderPtr loader;
96 network_service_->CreateURLLoader(GetProxy(&loader)); 97 network_service_->CreateURLLoader(GetProxy(&loader));
97 mojo::URLRequestPtr request(mojo::URLRequest::New()); 98 mojo::URLRequestPtr request(mojo::URLRequest::New());
98 request->url = url_; 99 request->url = url_;
99 request->auto_follow_redirects = true; 100 request->auto_follow_redirects = true;
100 101
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 234
234 DISALLOW_COPY_AND_ASSIGN(HTMLViewer); 235 DISALLOW_COPY_AND_ASSIGN(HTMLViewer);
235 }; 236 };
236 237
237 } // namespace html_viewer 238 } // namespace html_viewer
238 239
239 MojoResult MojoMain(MojoHandle shell_handle) { 240 MojoResult MojoMain(MojoHandle shell_handle) {
240 mojo::ApplicationRunnerChromium runner(new html_viewer::HTMLViewer); 241 mojo::ApplicationRunnerChromium runner(new html_viewer::HTMLViewer);
241 return runner.Run(shell_handle); 242 return runner.Run(shell_handle);
242 } 243 }
OLDNEW
« no previous file with comments | « no previous file | third_party/mojo/mojo_edk_system_impl.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698