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

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

Issue 2122023002: Cross-process frames should be notified of device scale factor changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Version of patch without second test. Created 4 years, 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_mus.h" 5 #include "content/browser/renderer_host/render_widget_host_view_mus.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "content/browser/renderer_host/render_process_host_impl.h" 10 #include "content/browser/renderer_host/render_process_host_impl.h"
11 #include "content/browser/renderer_host/render_widget_host_impl.h" 11 #include "content/browser/renderer_host/render_widget_host_impl.h"
12 #include "content/common/render_widget_window_tree_client_factory.mojom.h" 12 #include "content/common/render_widget_window_tree_client_factory.mojom.h"
13 #include "content/common/text_input_state.h" 13 #include "content/common/text_input_state.h"
14 #include "content/public/common/mojo_shell_connection.h" 14 #include "content/public/common/mojo_shell_connection.h"
15 #include "services/shell/public/cpp/connector.h" 15 #include "services/shell/public/cpp/connector.h"
16 #include "services/ui/public/cpp/property_type_converters.h" 16 #include "services/ui/public/cpp/property_type_converters.h"
17 #include "services/ui/public/cpp/window.h" 17 #include "services/ui/public/cpp/window.h"
18 #include "services/ui/public/cpp/window_property.h" 18 #include "services/ui/public/cpp/window_property.h"
19 #include "services/ui/public/cpp/window_tree_client.h" 19 #include "services/ui/public/cpp/window_tree_client.h"
20 #include "services/ui/public/interfaces/window_manager_constants.mojom.h" 20 #include "services/ui/public/interfaces/window_manager_constants.mojom.h"
21 #include "ui/aura/client/screen_position_client.h" 21 #include "ui/aura/client/screen_position_client.h"
22 #include "ui/aura/window.h" 22 #include "ui/aura/window.h"
23 #include "ui/base/hit_test.h" 23 #include "ui/base/hit_test.h"
24 24
25 namespace blink {
26 struct WebScreenInfo;
27 }
28
29 namespace content { 25 namespace content {
30 26
31 RenderWidgetHostViewMus::RenderWidgetHostViewMus(ui::Window* parent_window, 27 RenderWidgetHostViewMus::RenderWidgetHostViewMus(ui::Window* parent_window,
32 RenderWidgetHostImpl* host) 28 RenderWidgetHostImpl* host)
33 : host_(host), aura_window_(nullptr) { 29 : host_(host), aura_window_(nullptr) {
34 DCHECK(parent_window); 30 DCHECK(parent_window);
35 ui::Window* window = parent_window->window_tree()->NewWindow(); 31 ui::Window* window = parent_window->window_tree()->NewWindow();
36 window->SetVisible(true); 32 window->SetVisible(true);
37 window->SetBounds(gfx::Rect(300, 300)); 33 window->SetBounds(gfx::Rect(300, 300));
38 window->set_input_event_handler(this); 34 window->set_input_event_handler(this);
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 242
247 bool RenderWidgetHostViewMus::LockMouse() { 243 bool RenderWidgetHostViewMus::LockMouse() {
248 // TODO(fsamuel): Implement mouse lock in Mus. 244 // TODO(fsamuel): Implement mouse lock in Mus.
249 return false; 245 return false;
250 } 246 }
251 247
252 void RenderWidgetHostViewMus::UnlockMouse() { 248 void RenderWidgetHostViewMus::UnlockMouse() {
253 // TODO(fsamuel): Implement mouse lock in Mus. 249 // TODO(fsamuel): Implement mouse lock in Mus.
254 } 250 }
255 251
256 void RenderWidgetHostViewMus::GetScreenInfo(blink::WebScreenInfo* results) {
257 // TODO(fsamuel): Populate screen info from Mus.
258 }
259
260 gfx::Rect RenderWidgetHostViewMus::GetBoundsInRootWindow() { 252 gfx::Rect RenderWidgetHostViewMus::GetBoundsInRootWindow() {
261 aura::Window* top_level = aura_window_->GetToplevelWindow(); 253 aura::Window* top_level = aura_window_->GetToplevelWindow();
262 gfx::Rect bounds(top_level->GetBoundsInScreen()); 254 gfx::Rect bounds(top_level->GetBoundsInScreen());
263 return bounds; 255 return bounds;
264 } 256 }
265 257
266 #if defined(OS_MACOSX) 258 #if defined(OS_MACOSX)
267 ui::AcceleratedWidgetMac* RenderWidgetHostViewMus::GetAcceleratedWidgetMac() 259 ui::AcceleratedWidgetMac* RenderWidgetHostViewMus::GetAcceleratedWidgetMac()
268 const { 260 const {
269 return nullptr; 261 return nullptr;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 297
306 void RenderWidgetHostViewMus::OnWindowInputEvent( 298 void RenderWidgetHostViewMus::OnWindowInputEvent(
307 ui::Window* window, 299 ui::Window* window,
308 const ui::Event& event, 300 const ui::Event& event,
309 std::unique_ptr<base::Callback<void(ui::mojom::EventResult)>>* 301 std::unique_ptr<base::Callback<void(ui::mojom::EventResult)>>*
310 ack_callback) { 302 ack_callback) {
311 // TODO(sad): Dispatch |event| to the RenderWidgetHost. 303 // TODO(sad): Dispatch |event| to the RenderWidgetHost.
312 } 304 }
313 305
314 } // namespace content 306 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mus.h ('k') | content/browser/site_per_process_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698