OLD | NEW |
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 #ifndef MOJO_SERVICES_HTML_VIEWER_HTML_DOCUMENT_H_ | 5 #ifndef MOJO_SERVICES_HTML_VIEWER_HTML_DOCUMENT_H_ |
6 #define MOJO_SERVICES_HTML_VIEWER_HTML_DOCUMENT_H_ | 6 #define MOJO_SERVICES_HTML_VIEWER_HTML_DOCUMENT_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 // Commonly, the connecting application is the ViewManager and it will | 60 // Commonly, the connecting application is the ViewManager and it will |
61 // request ViewManagerClient. | 61 // request ViewManagerClient. |
62 // | 62 // |
63 // |shell| is the Shell connection for this mojo::Application. | 63 // |shell| is the Shell connection for this mojo::Application. |
64 HTMLDocument(mojo::InterfaceRequest<mojo::ServiceProvider> services, | 64 HTMLDocument(mojo::InterfaceRequest<mojo::ServiceProvider> services, |
65 mojo::URLResponsePtr response, | 65 mojo::URLResponsePtr response, |
66 mojo::Shell* shell, | 66 mojo::Shell* shell, |
67 scoped_refptr<base::MessageLoopProxy> compositor_thread, | 67 scoped_refptr<base::MessageLoopProxy> compositor_thread, |
68 WebMediaPlayerFactory* web_media_player_factory, | 68 WebMediaPlayerFactory* web_media_player_factory, |
69 bool is_headless); | 69 bool is_headless); |
70 virtual ~HTMLDocument(); | 70 ~HTMLDocument() override; |
71 | 71 |
72 private: | 72 private: |
73 // Updates the size and scale factor of the webview and related classes from | 73 // Updates the size and scale factor of the webview and related classes from |
74 // |root_|. | 74 // |root_|. |
75 void UpdateWebviewSizeFromViewSize(); | 75 void UpdateWebviewSizeFromViewSize(); |
76 | 76 |
77 // WebViewClient methods: | 77 // WebViewClient methods: |
78 virtual blink::WebStorageNamespace* createSessionStorageNamespace(); | 78 blink::WebStorageNamespace* createSessionStorageNamespace() override; |
79 | 79 |
80 // WebWidgetClient methods: | 80 // WebWidgetClient methods: |
81 virtual void initializeLayerTreeView(); | 81 void initializeLayerTreeView() override; |
82 virtual blink::WebLayerTreeView* layerTreeView(); | 82 blink::WebLayerTreeView* layerTreeView() override; |
83 | 83 |
84 // WebFrameClient methods: | 84 // WebFrameClient methods: |
85 virtual blink::WebMediaPlayer* createMediaPlayer( | 85 virtual blink::WebMediaPlayer* createMediaPlayer( |
86 blink::WebLocalFrame* frame, | 86 blink::WebLocalFrame* frame, |
87 const blink::WebURL& url, | 87 const blink::WebURL& url, |
88 blink::WebMediaPlayerClient* client); | 88 blink::WebMediaPlayerClient* client); |
89 virtual blink::WebMediaPlayer* createMediaPlayer( | 89 blink::WebMediaPlayer* createMediaPlayer( |
90 blink::WebLocalFrame* frame, | 90 blink::WebLocalFrame* frame, |
91 const blink::WebURL& url, | 91 const blink::WebURL& url, |
92 blink::WebMediaPlayerClient* client, | 92 blink::WebMediaPlayerClient* client, |
93 blink::WebContentDecryptionModule* initial_cdm); | 93 blink::WebContentDecryptionModule* initial_cdm) override; |
94 virtual blink::WebFrame* createChildFrame( | 94 blink::WebFrame* createChildFrame( |
95 blink::WebLocalFrame* parent, | 95 blink::WebLocalFrame* parent, |
96 const blink::WebString& frameName, | 96 const blink::WebString& frameName, |
97 blink::WebSandboxFlags sandboxFlags); | 97 blink::WebSandboxFlags sandboxFlags) override; |
98 virtual void frameDetached(blink::WebFrame*); | 98 void frameDetached(blink::WebFrame*) override; |
99 virtual blink::WebCookieJar* cookieJar(blink::WebLocalFrame* frame); | 99 blink::WebCookieJar* cookieJar(blink::WebLocalFrame* frame) override; |
100 virtual blink::WebNavigationPolicy decidePolicyForNavigation( | 100 blink::WebNavigationPolicy decidePolicyForNavigation( |
101 blink::WebLocalFrame* frame, | 101 blink::WebLocalFrame* frame, |
102 blink::WebDataSource::ExtraData* data, | 102 blink::WebDataSource::ExtraData* data, |
103 const blink::WebURLRequest& request, | 103 const blink::WebURLRequest& request, |
104 blink::WebNavigationType nav_type, | 104 blink::WebNavigationType nav_type, |
105 blink::WebNavigationPolicy default_policy, | 105 blink::WebNavigationPolicy default_policy, |
106 bool isRedirect); | 106 bool isRedirect) override; |
107 virtual void didAddMessageToConsole(const blink::WebConsoleMessage& message, | 107 void didAddMessageToConsole(const blink::WebConsoleMessage& message, |
108 const blink::WebString& source_name, | 108 const blink::WebString& source_name, |
109 unsigned source_line, | 109 unsigned source_line, |
110 const blink::WebString& stack_trace); | 110 const blink::WebString& stack_trace) override; |
111 virtual void didNavigateWithinPage(blink::WebLocalFrame* frame, | 111 void didNavigateWithinPage(blink::WebLocalFrame* frame, |
112 const blink::WebHistoryItem& history_item, | 112 const blink::WebHistoryItem& history_item, |
113 blink::WebHistoryCommitType commit_type); | 113 blink::WebHistoryCommitType commit_type) override; |
114 virtual blink::WebEncryptedMediaClient* encryptedMediaClient(); | 114 blink::WebEncryptedMediaClient* encryptedMediaClient() override; |
115 | 115 |
116 // ViewManagerDelegate methods: | 116 // ViewManagerDelegate methods: |
117 void OnEmbed(mojo::View* root, | 117 void OnEmbed(mojo::View* root, |
118 mojo::InterfaceRequest<mojo::ServiceProvider> services, | 118 mojo::InterfaceRequest<mojo::ServiceProvider> services, |
119 mojo::ServiceProviderPtr exposed_services) override; | 119 mojo::ServiceProviderPtr exposed_services) override; |
120 void OnViewManagerDisconnected(mojo::ViewManager* view_manager) override; | 120 void OnViewManagerDisconnected(mojo::ViewManager* view_manager) override; |
121 | 121 |
122 // ViewObserver methods: | 122 // ViewObserver methods: |
123 void OnViewBoundsChanged(mojo::View* view, | 123 void OnViewBoundsChanged(mojo::View* view, |
124 const mojo::Rect& old_bounds, | 124 const mojo::Rect& old_bounds, |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 scoped_ptr<TouchHandler> touch_handler_; | 157 scoped_ptr<TouchHandler> touch_handler_; |
158 | 158 |
159 float device_pixel_ratio_; | 159 float device_pixel_ratio_; |
160 | 160 |
161 DISALLOW_COPY_AND_ASSIGN(HTMLDocument); | 161 DISALLOW_COPY_AND_ASSIGN(HTMLDocument); |
162 }; | 162 }; |
163 | 163 |
164 } // namespace html_viewer | 164 } // namespace html_viewer |
165 | 165 |
166 #endif // MOJO_SERVICES_HTML_VIEWER_HTML_DOCUMENT_H_ | 166 #endif // MOJO_SERVICES_HTML_VIEWER_HTML_DOCUMENT_H_ |
OLD | NEW |