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

Unified Diff: components/html_viewer/html_document.h

Issue 1136743003: Plumbs through screen size and scale factor to html_viewer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | « components/html_viewer/BUILD.gn ('k') | components/html_viewer/html_document.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/html_viewer/html_document.h
diff --git a/components/html_viewer/html_document.h b/components/html_viewer/html_document.h
index 1eee3e09c1547271646d160d2d52dceb7540adda..83b06be309d9248d012c9bb9a5acb865b3a5cd94 100644
--- a/components/html_viewer/html_document.h
+++ b/components/html_viewer/html_document.h
@@ -44,6 +44,7 @@ class View;
namespace html_viewer {
class AxProviderImpl;
+class Setup;
class WebLayerTreeViewImpl;
class WebMediaPlayerFactory;
@@ -65,9 +66,7 @@ class HTMLDocument : public blink::WebViewClient,
HTMLDocument(mojo::InterfaceRequest<mojo::ServiceProvider> services,
mojo::URLResponsePtr response,
mojo::Shell* shell,
- scoped_refptr<base::MessageLoopProxy> compositor_thread,
- WebMediaPlayerFactory* web_media_player_factory,
- bool is_headless);
+ Setup* setup);
~HTMLDocument() override;
private:
@@ -75,6 +74,8 @@ class HTMLDocument : public blink::WebViewClient,
// |root_|.
void UpdateWebviewSizeFromViewSize();
+ void InitSetupAndLoadIfNecessary();
+
// WebViewClient methods:
virtual blink::WebStorageNamespace* createSessionStorageNamespace();
@@ -125,6 +126,10 @@ class HTMLDocument : public blink::WebViewClient,
void OnViewBoundsChanged(mojo::View* view,
const mojo::Rect& old_bounds,
const mojo::Rect& new_bounds) override;
+ void OnViewViewportMetricsChanged(
+ mojo::View* view,
+ const mojo::ViewportMetrics& old_metrics,
+ const mojo::ViewportMetrics& new_metrics) override;
void OnViewDestroyed(mojo::View* view) override;
void OnViewInputEvent(mojo::View* view, const mojo::EventPtr& event) override;
@@ -162,13 +167,10 @@ class HTMLDocument : public blink::WebViewClient,
// A flag set on didFinishLoad.
bool did_finish_load_ = false;
- // Set if the content will never be displayed.
- bool is_headless_;
+ Setup* setup_;
scoped_ptr<TouchHandler> touch_handler_;
- float device_pixel_ratio_;
-
DISALLOW_COPY_AND_ASSIGN(HTMLDocument);
};
« no previous file with comments | « components/html_viewer/BUILD.gn ('k') | components/html_viewer/html_document.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698