OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "blimp/engine/session/tab.h" | 5 #include "blimp/engine/session/tab.h" |
6 | 6 |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "base/trace_event/trace_event.h" | 8 #include "base/trace_event/trace_event.h" |
9 #include "blimp/common/create_blimp_message.h" | 9 #include "blimp/common/create_blimp_message.h" |
10 #include "blimp/common/proto/blimp_message.pb.h" | 10 #include "blimp/common/proto/blimp_message.pb.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 if (!web_contents_->GetController().CanGoForward()) { | 95 if (!web_contents_->GetController().CanGoForward()) { |
96 DLOG(ERROR) << "Ignoring forward in tab " << tab_id_; | 96 DLOG(ERROR) << "Ignoring forward in tab " << tab_id_; |
97 return; | 97 return; |
98 } | 98 } |
99 DVLOG(1) << "Forward in tab " << tab_id_; | 99 DVLOG(1) << "Forward in tab " << tab_id_; |
100 web_contents_->GetController().GoForward(); | 100 web_contents_->GetController().GoForward(); |
101 } | 101 } |
102 | 102 |
103 void Tab::Reload() { | 103 void Tab::Reload() { |
104 DVLOG(1) << "Reload in tab " << tab_id_; | 104 DVLOG(1) << "Reload in tab " << tab_id_; |
105 web_contents_->GetController().Reload(true); | 105 web_contents_->GetController().Reload(content::ReloadType::NORMAL, true); |
106 } | 106 } |
107 | 107 |
108 void Tab::RenderViewCreated(content::RenderViewHost* render_view_host) { | 108 void Tab::RenderViewCreated(content::RenderViewHost* render_view_host) { |
109 DCHECK(render_view_host); | 109 DCHECK(render_view_host); |
110 web_contents_->GetMutableRendererPrefs()->caret_blink_interval = 0; | 110 web_contents_->GetMutableRendererPrefs()->caret_blink_interval = 0; |
111 render_view_host->SyncRendererPrefs(); | 111 render_view_host->SyncRendererPrefs(); |
112 | 112 |
113 render_widget_feature_->OnRenderWidgetCreated(tab_id_, | 113 render_widget_feature_->OnRenderWidgetCreated(tab_id_, |
114 render_view_host->GetWidget()); | 114 render_view_host->GetWidget()); |
115 } | 115 } |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 void Tab::OnCompositorMessageReceived( | 209 void Tab::OnCompositorMessageReceived( |
210 content::RenderWidgetHost* render_widget_host, | 210 content::RenderWidgetHost* render_widget_host, |
211 const std::vector<uint8_t>& message) { | 211 const std::vector<uint8_t>& message) { |
212 TRACE_EVENT0("blimp", "Tab::OnCompositorMessageReceived"); | 212 TRACE_EVENT0("blimp", "Tab::OnCompositorMessageReceived"); |
213 | 213 |
214 render_widget_host->HandleCompositorProto(message); | 214 render_widget_host->HandleCompositorProto(message); |
215 } | 215 } |
216 | 216 |
217 } // namespace engine | 217 } // namespace engine |
218 } // namespace blimp | 218 } // namespace blimp |
OLD | NEW |