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

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

Issue 638293005: ContentHandler::OnConnect: replace the |url| param with |requestor_url|. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
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/macros.h" 5 #include "base/macros.h"
6 #include "base/message_loop/message_loop.h" 6 #include "base/message_loop/message_loop.h"
7 #include "base/threading/thread.h" 7 #include "base/threading/thread.h"
8 #include "mojo/application/application_runner_chromium.h" 8 #include "mojo/application/application_runner_chromium.h"
9 #include "mojo/public/c/system/main.h" 9 #include "mojo/public/c/system/main.h"
10 #include "mojo/public/cpp/application/application_connection.h" 10 #include "mojo/public/cpp/application/application_connection.h"
(...skipping 23 matching lines...) Expand all
34 scoped_refptr<base::MessageLoopProxy> compositor_thread, 34 scoped_refptr<base::MessageLoopProxy> compositor_thread,
35 WebMediaPlayerFactory* web_media_player_factory) 35 WebMediaPlayerFactory* web_media_player_factory)
36 : shell_(shell), 36 : shell_(shell),
37 compositor_thread_(compositor_thread), 37 compositor_thread_(compositor_thread),
38 web_media_player_factory_(web_media_player_factory) {} 38 web_media_player_factory_(web_media_player_factory) {}
39 virtual ~ContentHandlerImpl() {} 39 virtual ~ContentHandlerImpl() {}
40 40
41 private: 41 private:
42 // Overridden from ContentHandler: 42 // Overridden from ContentHandler:
43 virtual void OnConnect( 43 virtual void OnConnect(
44 const mojo::String& url, 44 const mojo::String& requestor_url,
45 URLResponsePtr response, 45 URLResponsePtr response,
46 InterfaceRequest<ServiceProvider> service_provider_request) override { 46 InterfaceRequest<ServiceProvider> service_provider_request) override {
47 new HTMLDocumentView(response.Pass(), 47 new HTMLDocumentView(response.Pass(),
48 service_provider_request.Pass(), 48 service_provider_request.Pass(),
49 shell_, 49 shell_,
50 compositor_thread_, 50 compositor_thread_,
51 web_media_player_factory_); 51 web_media_player_factory_);
52 } 52 }
53 53
54 Shell* shell_; 54 Shell* shell_;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 DISALLOW_COPY_AND_ASSIGN(HTMLViewer); 109 DISALLOW_COPY_AND_ASSIGN(HTMLViewer);
110 }; 110 };
111 111
112 } // namespace mojo 112 } // namespace mojo
113 113
114 MojoResult MojoMain(MojoHandle shell_handle) { 114 MojoResult MojoMain(MojoHandle shell_handle) {
115 mojo::ApplicationRunnerChromium runner(new mojo::HTMLViewer); 115 mojo::ApplicationRunnerChromium runner(new mojo::HTMLViewer);
116 return runner.Run(shell_handle); 116 return runner.Run(shell_handle);
117 } 117 }
OLDNEW
« no previous file with comments | « mojo/examples/png_viewer/png_viewer.cc ('k') | mojo/services/public/interfaces/content_handler/content_handler.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698