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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 10548026: mac: Make dynamic DPI changes work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 5286 matching lines...) Expand 10 before | Expand all | Expand 10 after
5297 WebRange webrange = WebRange::fromDocumentRange( 5297 WebRange webrange = WebRange::fromDocumentRange(
5298 frame, replacement_range.start(), replacement_range.length()); 5298 frame, replacement_range.start(), replacement_range.length());
5299 if (!webrange.isNull()) 5299 if (!webrange.isNull())
5300 frame->setSelectionToRange(webrange); 5300 frame->setSelectionToRange(webrange);
5301 } 5301 }
5302 } 5302 }
5303 RenderWidget::OnImeConfirmComposition(text, replacement_range); 5303 RenderWidget::OnImeConfirmComposition(text, replacement_range);
5304 } 5304 }
5305 } 5305 }
5306 5306
5307 void RenderViewImpl::OnSetDeviceScaleFactor(float device_scale_factor) {
5308 RenderWidget::OnSetDeviceScaleFactor(device_scale_factor);
5309 if (webview())
5310 webview()->setDeviceScaleFactor(device_scale_factor);
5311 }
5312
5307 ui::TextInputType RenderViewImpl::GetTextInputType() { 5313 ui::TextInputType RenderViewImpl::GetTextInputType() {
5308 return pepper_delegate_.IsPluginFocused() ? 5314 return pepper_delegate_.IsPluginFocused() ?
5309 pepper_delegate_.GetTextInputType() : RenderWidget::GetTextInputType(); 5315 pepper_delegate_.GetTextInputType() : RenderWidget::GetTextInputType();
5310 } 5316 }
5311 5317
5312 void RenderViewImpl::GetSelectionBounds(gfx::Rect* start, gfx::Rect* end) { 5318 void RenderViewImpl::GetSelectionBounds(gfx::Rect* start, gfx::Rect* end) {
5313 if (pepper_delegate_.IsPluginFocused()) { 5319 if (pepper_delegate_.IsPluginFocused()) {
5314 // TODO(kinaba) http://crbug.com/101101 5320 // TODO(kinaba) http://crbug.com/101101
5315 // Current Pepper IME API does not handle selection bounds. So we simply 5321 // Current Pepper IME API does not handle selection bounds. So we simply
5316 // use the caret position as an empty range for now. It will be updated 5322 // use the caret position as an empty range for now. It will be updated
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
5627 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { 5633 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const {
5628 return !!RenderThreadImpl::current()->compositor_thread(); 5634 return !!RenderThreadImpl::current()->compositor_thread();
5629 } 5635 }
5630 5636
5631 void RenderViewImpl::OnJavaBridgeInit() { 5637 void RenderViewImpl::OnJavaBridgeInit() {
5632 DCHECK(!java_bridge_dispatcher_); 5638 DCHECK(!java_bridge_dispatcher_);
5633 #if defined(ENABLE_JAVA_BRIDGE) 5639 #if defined(ENABLE_JAVA_BRIDGE)
5634 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); 5640 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this);
5635 #endif 5641 #endif
5636 } 5642 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698