| Index: content/renderer/render_view.cc
|
| diff --git a/content/renderer/render_view.cc b/content/renderer/render_view.cc
|
| index 1b63862e5ae515a31fab6b863ac63b33d81709d1..7cf3bb6b1e6f0530894d284ab579bd646d26ad27 100644
|
| --- a/content/renderer/render_view.cc
|
| +++ b/content/renderer/render_view.cc
|
| @@ -262,6 +262,10 @@ static const int kDelaySecondsForContentStateSync = 1;
|
| // The maximum number of popups that can be spawned from one page.
|
| static const int kMaximumNumberOfUnacknowledgedPopups = 25;
|
|
|
| +// The default layout width and height for pages when fixed layout is enabled.
|
| +static const int kDefaultLayoutWidth = 980;
|
| +static const int kDefaultLayoutHeight = 640;
|
| +
|
| static const float kScalingIncrement = 0.1f;
|
|
|
| static void GetRedirectChain(WebDataSource* ds, std::vector<GURL>* result) {
|
| @@ -1226,6 +1230,17 @@ void RenderView::UpdateURL(WebFrame* frame) {
|
| accessibility_.reset();
|
| pending_accessibility_notifications_.clear();
|
| }
|
| + const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
|
| + if (cmd_line->HasSwitch(switches::kEnableFixedLayout)) {
|
| + // Only enable fixed layout for normal web content.
|
| + GURL frame_url = GURL(request.url());
|
| + if (frame_url.SchemeIs(chrome::kHttpScheme) ||
|
| + frame_url.SchemeIs(chrome::kHttpsScheme)) {
|
| + webview()->enableFixedLayoutMode(true);
|
| + webview()->setFixedLayoutSize(
|
| + WebSize(kDefaultLayoutWidth, kDefaultLayoutHeight));
|
| + }
|
| + }
|
| }
|
|
|
| // Tell the embedding application that the title of the active page has changed
|
| @@ -1438,6 +1453,10 @@ WebExternalPopupMenu* RenderView::createExternalPopupMenu(
|
| return external_popup_menu_.get();
|
| }
|
|
|
| +WebRect RenderView::getDeviceRect() const {
|
| + return WebRect(0, 0, size().width(), size().height());
|
| +}
|
| +
|
| RenderWidgetFullscreenPepper* RenderView::CreatePepperFullscreenContainer(
|
| webkit::ppapi::PluginInstance* plugin) {
|
| GURL active_url;
|
|
|