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

Side by Side Diff: components/html_viewer/html_document_application_delegate.h

Issue 1431573002: Fix hangs in Mandoline page cycler on Linux with --enable-multiprocess. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 5 years, 1 month 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef COMPONENTS_HTML_VIEWER_HTML_DOCUMENT_APPLICATION_DELEGATE_H_ 5 #ifndef COMPONENTS_HTML_VIEWER_HTML_DOCUMENT_APPLICATION_DELEGATE_H_
6 #define COMPONENTS_HTML_VIEWER_HTML_DOCUMENT_APPLICATION_DELEGATE_H_ 6 #define COMPONENTS_HTML_VIEWER_HTML_DOCUMENT_APPLICATION_DELEGATE_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 11 matching lines...) Expand all
22 class HTMLDocument; 22 class HTMLDocument;
23 23
24 // ApplicationDelegate created by the content handler for a specific url. 24 // ApplicationDelegate created by the content handler for a specific url.
25 class HTMLDocumentApplicationDelegate : public mojo::ApplicationDelegate, 25 class HTMLDocumentApplicationDelegate : public mojo::ApplicationDelegate,
26 public HTMLFactory { 26 public HTMLFactory {
27 public: 27 public:
28 HTMLDocumentApplicationDelegate( 28 HTMLDocumentApplicationDelegate(
29 mojo::InterfaceRequest<mojo::Application> request, 29 mojo::InterfaceRequest<mojo::Application> request,
30 mojo::URLResponsePtr response, 30 mojo::URLResponsePtr response,
31 GlobalState* global_state, 31 GlobalState* global_state,
32 scoped_ptr<mojo::AppRefCount> parent_app_refcount); 32 scoped_ptr<mojo::AppRefCount> parent_app_refcount,
33 const mojo::Callback<void()>& destruct_callback);
33 34
34 void set_html_factory(HTMLFactory* factory) { html_factory_ = factory; } 35 void set_html_factory(HTMLFactory* factory) { html_factory_ = factory; }
35 HTMLFactory* html_factory() { return html_factory_; } 36 HTMLFactory* html_factory() { return html_factory_; }
36 37
37 private: 38 private:
38 class ServiceConnectorQueue; 39 class ServiceConnectorQueue;
39 40
40 ~HTMLDocumentApplicationDelegate() override; 41 ~HTMLDocumentApplicationDelegate() override;
41 42
42 // Callback from the quit closure. We key off this rather than 43 // Callback from the quit closure. We key off this rather than
(...skipping 26 matching lines...) Expand all
69 mojo::URLLoaderFactoryPtr url_loader_factory_; 70 mojo::URLLoaderFactoryPtr url_loader_factory_;
70 mojo::URLResponsePtr initial_response_; 71 mojo::URLResponsePtr initial_response_;
71 GlobalState* global_state_; 72 GlobalState* global_state_;
72 73
73 // As we create HTMLDocuments they are added here. They are removed when the 74 // As we create HTMLDocuments they are added here. They are removed when the
74 // HTMLDocument is deleted. 75 // HTMLDocument is deleted.
75 std::set<HTMLDocument*> documents2_; 76 std::set<HTMLDocument*> documents2_;
76 77
77 HTMLFactory* html_factory_; 78 HTMLFactory* html_factory_;
78 79
80 mojo::Callback<void()> destruct_callback_;
81
79 base::WeakPtrFactory<HTMLDocumentApplicationDelegate> weak_factory_; 82 base::WeakPtrFactory<HTMLDocumentApplicationDelegate> weak_factory_;
80 83
81 DISALLOW_COPY_AND_ASSIGN(HTMLDocumentApplicationDelegate); 84 DISALLOW_COPY_AND_ASSIGN(HTMLDocumentApplicationDelegate);
82 }; 85 };
83 86
84 } // namespace html_viewer 87 } // namespace html_viewer
85 88
86 #endif // COMPONENTS_HTML_VIEWER_HTML_DOCUMENT_APPLICATION_DELEGATE_H_ 89 #endif // COMPONENTS_HTML_VIEWER_HTML_DOCUMENT_APPLICATION_DELEGATE_H_
OLDNEW
« no previous file with comments | « components/html_viewer/content_handler_impl.cc ('k') | components/html_viewer/html_document_application_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698