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

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

Issue 409883007: Mojo: add support for cookies to HTMLViewer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: apply review feedback Created 6 years, 5 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
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/message_loop/message_loop.h" 5 #include "base/message_loop/message_loop.h"
6 #include "mojo/public/cpp/application/application_connection.h" 6 #include "mojo/public/cpp/application/application_connection.h"
7 #include "mojo/public/cpp/application/application_delegate.h" 7 #include "mojo/public/cpp/application/application_delegate.h"
8 #include "mojo/public/cpp/application/application_impl.h" 8 #include "mojo/public/cpp/application/application_impl.h"
9 #include "mojo/services/html_viewer/blink_platform_impl.h" 9 #include "mojo/services/html_viewer/blink_platform_impl.h"
10 #include "mojo/services/html_viewer/html_document_view.h" 10 #include "mojo/services/html_viewer/html_document_view.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 connection->AddService<NavigatorImpl>(this); 66 connection->AddService<NavigatorImpl>(this);
67 view_manager::ViewManager::ConfigureIncomingConnection(connection, this); 67 view_manager::ViewManager::ConfigureIncomingConnection(connection, this);
68 return true; 68 return true;
69 } 69 }
70 70
71 // Overridden from view_manager::ViewManagerDelegate: 71 // Overridden from view_manager::ViewManagerDelegate:
72 virtual void OnRootAdded(view_manager::ViewManager* view_manager, 72 virtual void OnRootAdded(view_manager::ViewManager* view_manager,
73 view_manager::Node* root) OVERRIDE { 73 view_manager::Node* root) OVERRIDE {
74 document_view_ = new HTMLDocumentView( 74 document_view_ = new HTMLDocumentView(
75 application_impl_->ConnectToApplication("mojo://mojo_window_manager/")-> 75 application_impl_->ConnectToApplication("mojo://mojo_window_manager/")->
76 GetServiceProvider(), view_manager); 76 GetServiceProvider(),
77 view_manager);
77 document_view_->AttachToNode(root); 78 document_view_->AttachToNode(root);
78 MaybeLoad(); 79 MaybeLoad();
79 } 80 }
80 virtual void OnViewManagerDisconnected( 81 virtual void OnViewManagerDisconnected(
81 view_manager::ViewManager* view_manager) OVERRIDE { 82 view_manager::ViewManager* view_manager) OVERRIDE {
82 base::MessageLoop::current()->Quit(); 83 base::MessageLoop::current()->Quit();
83 } 84 }
84 85
85 void MaybeLoad() { 86 void MaybeLoad() {
86 if (document_view_ && response_) 87 if (document_view_ && response_)
(...skipping 16 matching lines...) Expand all
103 navigation::ResponseDetailsPtr response_details) { 104 navigation::ResponseDetailsPtr response_details) {
104 viewer_->Load(response_details->response.Pass()); 105 viewer_->Load(response_details->response.Pass());
105 } 106 }
106 107
107 // static 108 // static
108 ApplicationDelegate* ApplicationDelegate::Create() { 109 ApplicationDelegate* ApplicationDelegate::Create() {
109 return new HTMLViewer; 110 return new HTMLViewer;
110 } 111 }
111 112
112 } 113 }
OLDNEW
« no previous file with comments | « mojo/services/html_viewer/html_document_view.cc ('k') | mojo/services/html_viewer/webcookiejar_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698