| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/blimp_engine_session.h" | 5 #include "blimp/engine/session/blimp_engine_session.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 } | 381 } |
| 382 | 382 |
| 383 void BlimpEngineSession::Reload(const int target_tab_id) { | 383 void BlimpEngineSession::Reload(const int target_tab_id) { |
| 384 DVLOG(1) << "Reload in tab " << target_tab_id; | 384 DVLOG(1) << "Reload in tab " << target_tab_id; |
| 385 web_contents_->GetController().Reload(true); | 385 web_contents_->GetController().Reload(true); |
| 386 } | 386 } |
| 387 | 387 |
| 388 void BlimpEngineSession::OnWebGestureEvent( | 388 void BlimpEngineSession::OnWebGestureEvent( |
| 389 content::RenderWidgetHost* render_widget_host, | 389 content::RenderWidgetHost* render_widget_host, |
| 390 std::unique_ptr<blink::WebGestureEvent> event) { | 390 std::unique_ptr<blink::WebGestureEvent> event) { |
| 391 TRACE_EVENT0("blimp", "BlimpEngineSession::OnWebGestureEvent"); | 391 TRACE_EVENT1("blimp", "BlimpEngineSession::OnWebGestureEvent", "type", |
| 392 | 392 event->type); |
| 393 render_widget_host->ForwardGestureEvent(*event); | 393 render_widget_host->ForwardGestureEvent(*event); |
| 394 } | 394 } |
| 395 | 395 |
| 396 void BlimpEngineSession::OnCompositorMessageReceived( | 396 void BlimpEngineSession::OnCompositorMessageReceived( |
| 397 content::RenderWidgetHost* render_widget_host, | 397 content::RenderWidgetHost* render_widget_host, |
| 398 const std::vector<uint8_t>& message) { | 398 const std::vector<uint8_t>& message) { |
| 399 TRACE_EVENT0("blimp", "BlimpEngineSession::OnCompositorMessageReceived"); | 399 TRACE_EVENT0("blimp", "BlimpEngineSession::OnCompositorMessageReceived"); |
| 400 | 400 |
| 401 render_widget_host->HandleCompositorProto(message); | 401 render_widget_host->HandleCompositorProto(message); |
| 402 } | 402 } |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 648 | 648 |
| 649 aura::Window* parent = window_tree_host_->window(); | 649 aura::Window* parent = window_tree_host_->window(); |
| 650 aura::Window* content = web_contents_->GetNativeView(); | 650 aura::Window* content = web_contents_->GetNativeView(); |
| 651 if (!parent->Contains(content)) | 651 if (!parent->Contains(content)) |
| 652 parent->AddChild(content); | 652 parent->AddChild(content); |
| 653 content->Show(); | 653 content->Show(); |
| 654 } | 654 } |
| 655 | 655 |
| 656 } // namespace engine | 656 } // namespace engine |
| 657 } // namespace blimp | 657 } // namespace blimp |
| OLD | NEW |