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 <set> | 7 #include <set> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 void OnWindowBoundsChanged(aura::Window* window, | 420 void OnWindowBoundsChanged(aura::Window* window, |
421 const gfx::Rect& old_bounds, | 421 const gfx::Rect& old_bounds, |
422 const gfx::Rect& new_bounds) override { | 422 const gfx::Rect& new_bounds) override { |
423 DCHECK(ancestors_.find(window) != ancestors_.end()); | 423 DCHECK(ancestors_.find(window) != ancestors_.end()); |
424 if (new_bounds.origin() != old_bounds.origin()) | 424 if (new_bounds.origin() != old_bounds.origin()) |
425 view_->HandleParentBoundsChanged(); | 425 view_->HandleParentBoundsChanged(); |
426 } | 426 } |
427 | 427 |
428 private: | 428 private: |
429 void RemoveAncestorObservers() { | 429 void RemoveAncestorObservers() { |
430 for (auto ancestor : ancestors_) | 430 for (auto* ancestor : ancestors_) |
431 ancestor->RemoveObserver(this); | 431 ancestor->RemoveObserver(this); |
432 ancestors_.clear(); | 432 ancestors_.clear(); |
433 } | 433 } |
434 | 434 |
435 RenderWidgetHostViewAura* view_; | 435 RenderWidgetHostViewAura* view_; |
436 std::set<aura::Window*> ancestors_; | 436 std::set<aura::Window*> ancestors_; |
437 | 437 |
438 DISALLOW_COPY_AND_ASSIGN(WindowAncestorObserver); | 438 DISALLOW_COPY_AND_ASSIGN(WindowAncestorObserver); |
439 }; | 439 }; |
440 | 440 |
(...skipping 2567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3008 | 3008 |
3009 //////////////////////////////////////////////////////////////////////////////// | 3009 //////////////////////////////////////////////////////////////////////////////// |
3010 // RenderWidgetHostViewBase, public: | 3010 // RenderWidgetHostViewBase, public: |
3011 | 3011 |
3012 // static | 3012 // static |
3013 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 3013 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
3014 GetScreenInfoForWindow(results, NULL); | 3014 GetScreenInfoForWindow(results, NULL); |
3015 } | 3015 } |
3016 | 3016 |
3017 } // namespace content | 3017 } // namespace content |
OLD | NEW |