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