| 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/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
| (...skipping 1510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1521 host_->CandidateWindowUpdated(); | 1521 host_->CandidateWindowUpdated(); |
| 1522 } | 1522 } |
| 1523 | 1523 |
| 1524 void RenderWidgetHostViewAura::OnCandidateWindowHidden() { | 1524 void RenderWidgetHostViewAura::OnCandidateWindowHidden() { |
| 1525 host_->CandidateWindowHidden(); | 1525 host_->CandidateWindowHidden(); |
| 1526 } | 1526 } |
| 1527 | 1527 |
| 1528 //////////////////////////////////////////////////////////////////////////////// | 1528 //////////////////////////////////////////////////////////////////////////////// |
| 1529 // RenderWidgetHostViewAura, gfx::DisplayObserver implementation: | 1529 // RenderWidgetHostViewAura, gfx::DisplayObserver implementation: |
| 1530 | 1530 |
| 1531 void RenderWidgetHostViewAura::OnDisplayBoundsChanged( |
| 1532 const gfx::Display& display) { |
| 1533 gfx::Screen* screen = gfx::Screen::GetScreenFor(window_); |
| 1534 if (display.id() == screen->GetDisplayNearestWindow(window_).id()) { |
| 1535 UpdateScreenInfo(window_); |
| 1536 current_cursor_.SetDisplayInfo(display); |
| 1537 UpdateCursorIfOverSelf(); |
| 1538 } |
| 1539 } |
| 1540 |
| 1531 void RenderWidgetHostViewAura::OnDisplayAdded( | 1541 void RenderWidgetHostViewAura::OnDisplayAdded( |
| 1532 const gfx::Display& new_display) { | 1542 const gfx::Display& new_display) { |
| 1533 } | 1543 } |
| 1534 | 1544 |
| 1535 void RenderWidgetHostViewAura::OnDisplayRemoved( | 1545 void RenderWidgetHostViewAura::OnDisplayRemoved( |
| 1536 const gfx::Display& old_display) { | 1546 const gfx::Display& old_display) { |
| 1537 } | 1547 } |
| 1538 | 1548 |
| 1539 void RenderWidgetHostViewAura::OnDisplayMetricsChanged( | |
| 1540 const gfx::Display& display, uint32_t metrics) { | |
| 1541 // The screen info should be updated regardless of the metric change. | |
| 1542 gfx::Screen* screen = gfx::Screen::GetScreenFor(window_); | |
| 1543 if (display.id() == screen->GetDisplayNearestWindow(window_).id()) { | |
| 1544 UpdateScreenInfo(window_); | |
| 1545 current_cursor_.SetDisplayInfo(display); | |
| 1546 UpdateCursorIfOverSelf(); | |
| 1547 } | |
| 1548 } | |
| 1549 | |
| 1550 //////////////////////////////////////////////////////////////////////////////// | 1549 //////////////////////////////////////////////////////////////////////////////// |
| 1551 // RenderWidgetHostViewAura, aura::WindowDelegate implementation: | 1550 // RenderWidgetHostViewAura, aura::WindowDelegate implementation: |
| 1552 | 1551 |
| 1553 gfx::Size RenderWidgetHostViewAura::GetMinimumSize() const { | 1552 gfx::Size RenderWidgetHostViewAura::GetMinimumSize() const { |
| 1554 return gfx::Size(); | 1553 return gfx::Size(); |
| 1555 } | 1554 } |
| 1556 | 1555 |
| 1557 gfx::Size RenderWidgetHostViewAura::GetMaximumSize() const { | 1556 gfx::Size RenderWidgetHostViewAura::GetMaximumSize() const { |
| 1558 return gfx::Size(); | 1557 return gfx::Size(); |
| 1559 } | 1558 } |
| (...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2380 | 2379 |
| 2381 //////////////////////////////////////////////////////////////////////////////// | 2380 //////////////////////////////////////////////////////////////////////////////// |
| 2382 // RenderWidgetHostViewBase, public: | 2381 // RenderWidgetHostViewBase, public: |
| 2383 | 2382 |
| 2384 // static | 2383 // static |
| 2385 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 2384 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
| 2386 GetScreenInfoForWindow(results, NULL); | 2385 GetScreenInfoForWindow(results, NULL); |
| 2387 } | 2386 } |
| 2388 | 2387 |
| 2389 } // namespace content | 2388 } // namespace content |
| OLD | NEW |