OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "content/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 3378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3389 command_line.GetSwitchValueASCII(switches::kEnableFixedLayout); | 3389 command_line.GetSwitchValueASCII(switches::kEnableFixedLayout); |
3390 std::vector<std::string> tokens; | 3390 std::vector<std::string> tokens; |
3391 base::SplitString(str, ',', &tokens); | 3391 base::SplitString(str, ',', &tokens); |
3392 if (tokens.size() == 2) { | 3392 if (tokens.size() == 2) { |
3393 int width, height; | 3393 int width, height; |
3394 if (base::StringToInt(tokens[0], &width) && | 3394 if (base::StringToInt(tokens[0], &width) && |
3395 base::StringToInt(tokens[1], &height)) | 3395 base::StringToInt(tokens[1], &height)) |
3396 webview()->setFixedLayoutSize(WebSize(width, height)); | 3396 webview()->setFixedLayoutSize(WebSize(width, height)); |
3397 } | 3397 } |
3398 } | 3398 } |
3399 | 3399 #if defined(OS_CHROMEOS) |
3400 if (command_line.HasSwitch(switches::kDisablePinch)) | |
darin (slow to review)
2013/03/08 22:41:22
I think you should break this apart so you are not
wjmaclean
2013/03/11 13:09:10
Done.
| |
3401 webview()->setPageScaleFactorLimits(1, 1); | |
3402 else | |
3403 webview()->setPageScaleFactorLimits(1, 4); | |
3404 #else | |
3400 if (command_line.HasSwitch(switches::kEnablePinch)) | 3405 if (command_line.HasSwitch(switches::kEnablePinch)) |
3401 webview()->setPageScaleFactorLimits(1, 4); | 3406 webview()->setPageScaleFactorLimits(1, 4); |
3402 else | 3407 else |
3403 webview()->setPageScaleFactorLimits(1, 1); | 3408 webview()->setPageScaleFactorLimits(1, 1); |
3409 #endif | |
3404 } | 3410 } |
3405 | 3411 |
3406 void RenderViewImpl::didStartProvisionalLoad(WebFrame* frame) { | 3412 void RenderViewImpl::didStartProvisionalLoad(WebFrame* frame) { |
3407 WebDataSource* ds = frame->provisionalDataSource(); | 3413 WebDataSource* ds = frame->provisionalDataSource(); |
3408 | 3414 |
3409 // In fast/loader/stop-provisional-loads.html, we abort the load before this | 3415 // In fast/loader/stop-provisional-loads.html, we abort the load before this |
3410 // callback is invoked. | 3416 // callback is invoked. |
3411 if (!ds) | 3417 if (!ds) |
3412 return; | 3418 return; |
3413 | 3419 |
(...skipping 3278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6692 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); | 6698 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); |
6693 RenderProcess::current()->ReleaseTransportDIB(dib); | 6699 RenderProcess::current()->ReleaseTransportDIB(dib); |
6694 } | 6700 } |
6695 | 6701 |
6696 void RenderViewImpl::DidCommitCompositorFrame() { | 6702 void RenderViewImpl::DidCommitCompositorFrame() { |
6697 RenderWidget::DidCommitCompositorFrame(); | 6703 RenderWidget::DidCommitCompositorFrame(); |
6698 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidCommitCompositorFrame()); | 6704 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidCommitCompositorFrame()); |
6699 } | 6705 } |
6700 | 6706 |
6701 } // namespace content | 6707 } // namespace content |
OLD | NEW |