| 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/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 769 host_->WasResized(); | 769 host_->WasResized(); |
| 770 MaybeCreateResizeLock(); | 770 MaybeCreateResizeLock(); |
| 771 if (touch_editing_client_) { | 771 if (touch_editing_client_) { |
| 772 touch_editing_client_->OnSelectionOrCursorChanged(selection_anchor_rect_, | 772 touch_editing_client_->OnSelectionOrCursorChanged(selection_anchor_rect_, |
| 773 selection_focus_rect_); | 773 selection_focus_rect_); |
| 774 } | 774 } |
| 775 } | 775 } |
| 776 | 776 |
| 777 void RenderWidgetHostViewAura::MaybeCreateResizeLock() { | 777 void RenderWidgetHostViewAura::MaybeCreateResizeLock() { |
| 778 gfx::Size desired_size = window_->bounds().size(); | 778 gfx::Size desired_size = window_->bounds().size(); |
| 779 if (!resize_lock_.get() && | 779 if (!host_->should_auto_resize() && |
| 780 !resize_lock_.get() && |
| 780 desired_size != current_frame_size_ && | 781 desired_size != current_frame_size_ && |
| 781 host_->is_accelerated_compositing_active()) { | 782 host_->is_accelerated_compositing_active()) { |
| 782 aura::RootWindow* root_window = window_->GetRootWindow(); | 783 aura::RootWindow* root_window = window_->GetRootWindow(); |
| 783 ui::Compositor* compositor = root_window ? | 784 ui::Compositor* compositor = root_window ? |
| 784 root_window->compositor() : NULL; | 785 root_window->compositor() : NULL; |
| 785 if (root_window && compositor) { | 786 if (root_window && compositor) { |
| 786 // Listen to changes in the compositor lock state. | 787 // Listen to changes in the compositor lock state. |
| 787 if (!compositor->HasObserver(this)) | 788 if (!compositor->HasObserver(this)) |
| 788 compositor->AddObserver(this); | 789 compositor->AddObserver(this); |
| 789 | 790 |
| (...skipping 2126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2916 RenderWidgetHost* widget) { | 2917 RenderWidgetHost* widget) { |
| 2917 return new RenderWidgetHostViewAura(widget); | 2918 return new RenderWidgetHostViewAura(widget); |
| 2918 } | 2919 } |
| 2919 | 2920 |
| 2920 // static | 2921 // static |
| 2921 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { | 2922 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { |
| 2922 GetScreenInfoForWindow(results, NULL); | 2923 GetScreenInfoForWindow(results, NULL); |
| 2923 } | 2924 } |
| 2924 | 2925 |
| 2925 } // namespace content | 2926 } // namespace content |
| OLD | NEW |