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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 2593323002: Use the physical-pixel space for native IME on linux platform. (Closed)
Patch Set: Created 3 years, 12 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
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/browser/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 1270 matching lines...) Expand 10 before | Expand all | Expand 10 after
1281 screen_position_client->ConvertPointFromScreen(window_, &end); 1281 screen_position_client->ConvertPointFromScreen(window_, &end);
1282 return gfx::Rect(origin.x(), 1282 return gfx::Rect(origin.x(),
1283 origin.y(), 1283 origin.y(),
1284 end.x() - origin.x(), 1284 end.x() - origin.x(),
1285 end.y() - origin.y()); 1285 end.y() - origin.y());
1286 } 1286 }
1287 1287
1288 return rect; 1288 return rect;
1289 } 1289 }
1290 1290
1291 float RenderWidgetHostViewAura::GetScaleFactor() const {
1292 return display::Screen::GetScreen()
1293 ->GetDisplayNearestWindow(window_).device_scale_factor();
sadrul 2016/12/22 01:30:22 just return |device_scale_factor_|?
Shu Chen 2016/12/22 03:02:27 Ah, I didn't notice that. Thanks for pointing it o
1294 }
1295
1291 gfx::Rect RenderWidgetHostViewAura::GetCaretBounds() const { 1296 gfx::Rect RenderWidgetHostViewAura::GetCaretBounds() const {
1292 if (!text_input_manager_ || !text_input_manager_->GetActiveWidget()) 1297 if (!text_input_manager_ || !text_input_manager_->GetActiveWidget())
1293 return gfx::Rect(); 1298 return gfx::Rect();
1294 1299
1295 const TextInputManager::SelectionRegion* region = 1300 const TextInputManager::SelectionRegion* region =
1296 text_input_manager_->GetSelectionRegion(); 1301 text_input_manager_->GetSelectionRegion();
1297 return ConvertRectToScreen( 1302 return ConvertRectToScreen(
1298 gfx::RectBetweenSelectionBounds(region->anchor, region->focus)); 1303 gfx::RectBetweenSelectionBounds(region->anchor, region->focus));
1299 } 1304 }
1300 1305
(...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after
2380 2385
2381 void RenderWidgetHostViewAura::SetPopupChild( 2386 void RenderWidgetHostViewAura::SetPopupChild(
2382 RenderWidgetHostViewAura* popup_child_host_view) { 2387 RenderWidgetHostViewAura* popup_child_host_view) {
2383 popup_child_host_view_ = popup_child_host_view; 2388 popup_child_host_view_ = popup_child_host_view;
2384 event_handler_->SetPopupChild( 2389 event_handler_->SetPopupChild(
2385 popup_child_host_view, 2390 popup_child_host_view,
2386 popup_child_host_view ? popup_child_host_view->event_handler() : nullptr); 2391 popup_child_host_view ? popup_child_host_view->event_handler() : nullptr);
2387 } 2392 }
2388 2393
2389 } // namespace content 2394 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698