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

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

Issue 1037423002: html_viewer: Run with a cookie jar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: virtual -> override 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 | « mojo/services/html_viewer/mojo_blink_platform_impl.h ('k') | no next file » | 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 "mojo/services/html_viewer/mojo_blink_platform_impl.h" 5 #include "mojo/services/html_viewer/mojo_blink_platform_impl.h"
6 6
7 #include "mojo/services/html_viewer/webclipboard_impl.h" 7 #include "mojo/services/html_viewer/webclipboard_impl.h"
8 #include "mojo/services/html_viewer/webcookiejar_impl.h" 8 #include "mojo/services/html_viewer/webcookiejar_impl.h"
9 #include "mojo/services/html_viewer/websockethandle_impl.h" 9 #include "mojo/services/html_viewer/websockethandle_impl.h"
10 #include "mojo/services/html_viewer/weburlloader_impl.h" 10 #include "mojo/services/html_viewer/weburlloader_impl.h"
11 #include "third_party/mojo/src/mojo/public/cpp/application/application_impl.h" 11 #include "third_party/mojo/src/mojo/public/cpp/application/application_impl.h"
12 12
13 namespace html_viewer { 13 namespace html_viewer {
14 14
15 MojoBlinkPlatformImpl::MojoBlinkPlatformImpl(mojo::ApplicationImpl* app) { 15 MojoBlinkPlatformImpl::MojoBlinkPlatformImpl(mojo::ApplicationImpl* app) {
16 app->ConnectToService("mojo:network_service", &network_service_); 16 app->ConnectToService("mojo:network_service", &network_service_);
17 17
18 mojo::CookieStorePtr cookie_store; 18 mojo::CookieStorePtr cookie_store;
19 network_service_->GetCookieStore(GetProxy(&cookie_store)); 19 network_service_->GetCookieStore(GetProxy(&cookie_store));
20 cookie_jar_.reset(new WebCookieJarImpl(cookie_store.Pass())); 20 cookie_jar_.reset(new WebCookieJarImpl(cookie_store.Pass()));
21 21
22 mojo::ClipboardPtr clipboard; 22 mojo::ClipboardPtr clipboard;
23 app->ConnectToService("mojo:clipboard", &clipboard); 23 app->ConnectToService("mojo:clipboard", &clipboard);
24 clipboard_.reset(new WebClipboardImpl(clipboard.Pass())); 24 clipboard_.reset(new WebClipboardImpl(clipboard.Pass()));
25 } 25 }
26 26
27 MojoBlinkPlatformImpl::~MojoBlinkPlatformImpl() { 27 MojoBlinkPlatformImpl::~MojoBlinkPlatformImpl() {
28 } 28 }
29 29
30 blink::WebCookieJar* MojoBlinkPlatformImpl::cookieJar() {
31 return cookie_jar_.get();
32 }
33
34 blink::WebClipboard* MojoBlinkPlatformImpl::clipboard() {
35 return clipboard_.get();
36 }
37
30 blink::WebURLLoader* MojoBlinkPlatformImpl::createURLLoader() { 38 blink::WebURLLoader* MojoBlinkPlatformImpl::createURLLoader() {
31 return new WebURLLoaderImpl(network_service_.get()); 39 return new WebURLLoaderImpl(network_service_.get());
32 } 40 }
33 41
34 blink::WebSocketHandle* MojoBlinkPlatformImpl::createWebSocketHandle() { 42 blink::WebSocketHandle* MojoBlinkPlatformImpl::createWebSocketHandle() {
35 return new WebSocketHandleImpl(network_service_.get()); 43 return new WebSocketHandleImpl(network_service_.get());
36 } 44 }
37 45
38 } // namespace html_viewer 46 } // namespace html_viewer
OLDNEW
« no previous file with comments | « mojo/services/html_viewer/mojo_blink_platform_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698