| 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/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 "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 2360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2371 gfx::Rect intersected_rect( | 2371 gfx::Rect intersected_rect( |
| 2372 gfx::IntersectRects(rect, window_->GetBoundsInScreen())); | 2372 gfx::IntersectRects(rect, window_->GetBoundsInScreen())); |
| 2373 | 2373 |
| 2374 if (intersected_rect.IsEmpty()) | 2374 if (intersected_rect.IsEmpty()) |
| 2375 return; | 2375 return; |
| 2376 | 2376 |
| 2377 host_->ScrollFocusedEditableNodeIntoRect( | 2377 host_->ScrollFocusedEditableNodeIntoRect( |
| 2378 ConvertRectFromScreen(intersected_rect)); | 2378 ConvertRectFromScreen(intersected_rect)); |
| 2379 } | 2379 } |
| 2380 | 2380 |
| 2381 void RenderWidgetHostViewAura::OnCandidateWindowShow() { |
| 2382 host_->CandidateWindowShow(); |
| 2383 } |
| 2384 |
| 2385 void RenderWidgetHostViewAura::OnCandidateWindowUpdate() { |
| 2386 host_->CandidateWindowUpdate(); |
| 2387 } |
| 2388 |
| 2389 void RenderWidgetHostViewAura::OnCandidateWindowHide() { |
| 2390 host_->CandidateWindowHide(); |
| 2391 } |
| 2392 |
| 2381 //////////////////////////////////////////////////////////////////////////////// | 2393 //////////////////////////////////////////////////////////////////////////////// |
| 2382 // RenderWidgetHostViewAura, gfx::DisplayObserver implementation: | 2394 // RenderWidgetHostViewAura, gfx::DisplayObserver implementation: |
| 2383 | 2395 |
| 2384 void RenderWidgetHostViewAura::OnDisplayBoundsChanged( | 2396 void RenderWidgetHostViewAura::OnDisplayBoundsChanged( |
| 2385 const gfx::Display& display) { | 2397 const gfx::Display& display) { |
| 2386 gfx::Screen* screen = gfx::Screen::GetScreenFor(window_); | 2398 gfx::Screen* screen = gfx::Screen::GetScreenFor(window_); |
| 2387 if (display.id() == screen->GetDisplayNearestWindow(window_).id()) { | 2399 if (display.id() == screen->GetDisplayNearestWindow(window_).id()) { |
| 2388 UpdateScreenInfo(window_); | 2400 UpdateScreenInfo(window_); |
| 2389 current_cursor_.SetDisplayInfo(display); | 2401 current_cursor_.SetDisplayInfo(display); |
| 2390 UpdateCursorIfOverSelf(); | 2402 UpdateCursorIfOverSelf(); |
| (...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3364 RenderWidgetHost* widget) { | 3376 RenderWidgetHost* widget) { |
| 3365 return new RenderWidgetHostViewAura(widget); | 3377 return new RenderWidgetHostViewAura(widget); |
| 3366 } | 3378 } |
| 3367 | 3379 |
| 3368 // static | 3380 // static |
| 3369 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { | 3381 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { |
| 3370 GetScreenInfoForWindow(results, NULL); | 3382 GetScreenInfoForWindow(results, NULL); |
| 3371 } | 3383 } |
| 3372 | 3384 |
| 3373 } // namespace content | 3385 } // namespace content |
| OLD | NEW |