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 1513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1524 host_->CandidateWindowUpdated(); | 1524 host_->CandidateWindowUpdated(); |
1525 } | 1525 } |
1526 | 1526 |
1527 void RenderWidgetHostViewAura::OnCandidateWindowHidden() { | 1527 void RenderWidgetHostViewAura::OnCandidateWindowHidden() { |
1528 host_->CandidateWindowHidden(); | 1528 host_->CandidateWindowHidden(); |
1529 } | 1529 } |
1530 | 1530 |
1531 //////////////////////////////////////////////////////////////////////////////// | 1531 //////////////////////////////////////////////////////////////////////////////// |
1532 // RenderWidgetHostViewAura, gfx::DisplayObserver implementation: | 1532 // RenderWidgetHostViewAura, gfx::DisplayObserver implementation: |
1533 | 1533 |
1534 void RenderWidgetHostViewAura::OnDisplayBoundsChanged( | |
1535 const gfx::Display& display) { | |
1536 gfx::Screen* screen = gfx::Screen::GetScreenFor(window_); | |
1537 if (display.id() == screen->GetDisplayNearestWindow(window_).id()) { | |
1538 UpdateScreenInfo(window_); | |
1539 current_cursor_.SetDisplayInfo(display); | |
1540 UpdateCursorIfOverSelf(); | |
1541 } | |
1542 } | |
1543 | |
1544 void RenderWidgetHostViewAura::OnDisplayAdded( | 1534 void RenderWidgetHostViewAura::OnDisplayAdded( |
1545 const gfx::Display& new_display) { | 1535 const gfx::Display& new_display) { |
1546 } | 1536 } |
1547 | 1537 |
1548 void RenderWidgetHostViewAura::OnDisplayRemoved( | 1538 void RenderWidgetHostViewAura::OnDisplayRemoved( |
1549 const gfx::Display& old_display) { | 1539 const gfx::Display& old_display) { |
1550 } | 1540 } |
1551 | 1541 |
1542 void RenderWidgetHostViewAura::OnDisplayMetricsChanged( | |
1543 const gfx::Display& display, DisplayObserver::DisplayMetrics) { | |
jochen (gone - plz use gerrit)
2014/05/14 09:05:43
please don't omit parameter names
| |
1544 // The screen info should be updated regardless of the metric change. | |
1545 gfx::Screen* screen = gfx::Screen::GetScreenFor(window_); | |
1546 if (display.id() == screen->GetDisplayNearestWindow(window_).id()) { | |
1547 UpdateScreenInfo(window_); | |
1548 current_cursor_.SetDisplayInfo(display); | |
1549 UpdateCursorIfOverSelf(); | |
1550 } | |
1551 } | |
1552 | |
1552 //////////////////////////////////////////////////////////////////////////////// | 1553 //////////////////////////////////////////////////////////////////////////////// |
1553 // RenderWidgetHostViewAura, aura::WindowDelegate implementation: | 1554 // RenderWidgetHostViewAura, aura::WindowDelegate implementation: |
1554 | 1555 |
1555 gfx::Size RenderWidgetHostViewAura::GetMinimumSize() const { | 1556 gfx::Size RenderWidgetHostViewAura::GetMinimumSize() const { |
1556 return gfx::Size(); | 1557 return gfx::Size(); |
1557 } | 1558 } |
1558 | 1559 |
1559 gfx::Size RenderWidgetHostViewAura::GetMaximumSize() const { | 1560 gfx::Size RenderWidgetHostViewAura::GetMaximumSize() const { |
1560 return gfx::Size(); | 1561 return gfx::Size(); |
1561 } | 1562 } |
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2382 | 2383 |
2383 //////////////////////////////////////////////////////////////////////////////// | 2384 //////////////////////////////////////////////////////////////////////////////// |
2384 // RenderWidgetHostViewBase, public: | 2385 // RenderWidgetHostViewBase, public: |
2385 | 2386 |
2386 // static | 2387 // static |
2387 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 2388 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
2388 GetScreenInfoForWindow(results, NULL); | 2389 GetScreenInfoForWindow(results, NULL); |
2389 } | 2390 } |
2390 | 2391 |
2391 } // namespace content | 2392 } // namespace content |
OLD | NEW |