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 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
716 return; | 716 return; |
717 | 717 |
718 if (needs_begin_frames) | 718 if (needs_begin_frames) |
719 begin_frame_source_->AddObserver(this); | 719 begin_frame_source_->AddObserver(this); |
720 else | 720 else |
721 begin_frame_source_->RemoveObserver(this); | 721 begin_frame_source_->RemoveObserver(this); |
722 } | 722 } |
723 | 723 |
724 void RenderWidgetHostViewAura::OnBeginFrame( | 724 void RenderWidgetHostViewAura::OnBeginFrame( |
725 const cc::BeginFrameArgs& args) { | 725 const cc::BeginFrameArgs& args) { |
726 delegated_frame_host_->SetVSyncParameters(args.frame_time, args.interval); | |
727 host_->Send(new ViewMsg_BeginFrame(host_->GetRoutingID(), args)); | 726 host_->Send(new ViewMsg_BeginFrame(host_->GetRoutingID(), args)); |
728 last_begin_frame_args_ = args; | 727 last_begin_frame_args_ = args; |
729 } | 728 } |
730 | 729 |
731 const cc::BeginFrameArgs& RenderWidgetHostViewAura::LastUsedBeginFrameArgs() | 730 const cc::BeginFrameArgs& RenderWidgetHostViewAura::LastUsedBeginFrameArgs() |
732 const { | 731 const { |
733 return last_begin_frame_args_; | 732 return last_begin_frame_args_; |
734 } | 733 } |
735 | 734 |
736 void RenderWidgetHostViewAura::OnBeginFrameSourcePausedChanged(bool paused) { | 735 void RenderWidgetHostViewAura::OnBeginFrameSourcePausedChanged(bool paused) { |
(...skipping 2308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3045 ->GetTextSelection(focused_view) | 3044 ->GetTextSelection(focused_view) |
3046 ->GetSelectedText(&selected_text)) { | 3045 ->GetSelectedText(&selected_text)) { |
3047 // Set the CLIPBOARD_TYPE_SELECTION to the ui::Clipboard. | 3046 // Set the CLIPBOARD_TYPE_SELECTION to the ui::Clipboard. |
3048 ui::ScopedClipboardWriter clipboard_writer(ui::CLIPBOARD_TYPE_SELECTION); | 3047 ui::ScopedClipboardWriter clipboard_writer(ui::CLIPBOARD_TYPE_SELECTION); |
3049 clipboard_writer.WriteText(selected_text); | 3048 clipboard_writer.WriteText(selected_text); |
3050 } | 3049 } |
3051 #endif // defined(USE_X11) && !defined(OS_CHROMEOS) | 3050 #endif // defined(USE_X11) && !defined(OS_CHROMEOS) |
3052 } | 3051 } |
3053 | 3052 |
3054 } // namespace content | 3053 } // namespace content |
OLD | NEW |