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

Unified Diff: mojo/services/html_viewer/html_document.h

Issue 1049013004: Add some simple HTMLViewer apptests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use net::SpawnedTestServer instead of mojo:http_server. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/services/html_viewer/ax_provider_impl_unittest.cc ('k') | mojo/services/html_viewer/html_document.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/html_viewer/html_document.h
diff --git a/mojo/services/html_viewer/html_document.h b/mojo/services/html_viewer/html_document.h
index 217e2b8c266d4b90e0803b02efea17cf65ed0f9d..2cda9db6294cd0bc3c81c8808e5513e71c90f4d9 100644
--- a/mojo/services/html_viewer/html_document.h
+++ b/mojo/services/html_viewer/html_document.h
@@ -51,16 +51,17 @@ class HTMLDocument : public blink::WebViewClient,
public mojo::ViewManagerDelegate,
public mojo::ViewObserver,
public mojo::InterfaceFactory<mojo::AxProvider> {
+ // , public mojo::InterfaceImpl<mojo::HTMLDocumentTestAPI>,
+ // public mojo::InterfaceFactory<mojo::HTMLDocumentTestAPI> {
public:
// Load a new HTMLDocument with |response|.
//
- // |services| should be used to implement a ServiceProvider which exposes
- // services to the connecting application.
+ // Services are offered to the connecting application via |service_provider|.
// Commonly, the connecting application is the ViewManager and it will
// request ViewManagerClient.
//
// |shell| is the Shell connection for this mojo::Application.
- HTMLDocument(mojo::InterfaceRequest<mojo::ServiceProvider> services,
+ HTMLDocument(mojo::ServiceProviderImpl* service_provider,
mojo::URLResponsePtr response,
mojo::Shell* shell,
scoped_refptr<base::MessageLoopProxy> compositor_thread,
@@ -107,11 +108,13 @@ class HTMLDocument : public blink::WebViewClient,
const blink::WebString& source_name,
unsigned source_line,
const blink::WebString& stack_trace);
+ virtual void didFinishLoad(blink::WebLocalFrame* frame);
virtual void didNavigateWithinPage(blink::WebLocalFrame* frame,
const blink::WebHistoryItem& history_item,
blink::WebHistoryCommitType commit_type);
virtual blink::WebEncryptedMediaClient* encryptedMediaClient();
+
// ViewManagerDelegate methods:
void OnEmbed(mojo::View* root,
mojo::InterfaceRequest<mojo::ServiceProvider> services,
@@ -125,14 +128,22 @@ class HTMLDocument : public blink::WebViewClient,
void OnViewDestroyed(mojo::View* view) override;
void OnViewInputEvent(mojo::View* view, const mojo::EventPtr& event) override;
- // InterfaceFactory<AxProvider>
+ // mojo::InterfaceFactory<mojo::AxProvider>
void Create(mojo::ApplicationConnection* connection,
mojo::InterfaceRequest<mojo::AxProvider> request) override;
+ // // mojo::InterfaceImpl<mojo::HTMLDocumentTestAPI>
+ // void GetLayoutTreeAsText(
+ // const GetLayoutTreeAsTextCallback& callback) override;
+
+ // // mojo::InterfaceFactory<mojo::HTMLDocumentTestAPI>
+ // void Create(
+ // mojo::ApplicationConnection* connection,
+ // mojo::InterfaceRequest<mojo::HTMLDocumentTestAPI> request) override;
+
void Load(mojo::URLResponsePtr response);
mojo::URLResponsePtr response_;
- mojo::ServiceProviderImpl exported_services_;
mojo::ServiceProviderPtr embedder_service_provider_;
mojo::Shell* shell_;
mojo::LazyInterfacePtr<mojo::NavigatorHost> navigator_host_;
@@ -148,7 +159,9 @@ class HTMLDocument : public blink::WebViewClient,
scoped_ptr<media::MediaPermission> media_permission_;
// HTMLDocument owns these pointers.
- std::set<AxProviderImpl*> ax_provider_impls_;
+ std::set<mojo::InterfaceRequest<mojo::AxProvider>*> ax_provider_requests_;
+ std::set<AxProviderImpl*> ax_providers_;
+ bool did_finish_load_ = false;
// Set if the content will never be displayed.
bool is_headless_;
« no previous file with comments | « mojo/services/html_viewer/ax_provider_impl_unittest.cc ('k') | mojo/services/html_viewer/html_document.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698