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 "components/html_viewer/html_frame.h" | 5 #include "components/html_viewer/html_frame.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
785 event.To<scoped_ptr<blink::WebInputEvent>>(); | 785 event.To<scoped_ptr<blink::WebInputEvent>>(); |
786 if (web_event) | 786 if (web_event) |
787 web_widget->handleInputEvent(*web_event); | 787 web_widget->handleInputEvent(*web_event); |
788 } | 788 } |
789 | 789 |
790 void HTMLFrame::OnWindowFocusChanged(mus::Window* gained_focus, | 790 void HTMLFrame::OnWindowFocusChanged(mus::Window* gained_focus, |
791 mus::Window* lost_focus) { | 791 mus::Window* lost_focus) { |
792 UpdateFocus(); | 792 UpdateFocus(); |
793 } | 793 } |
794 | 794 |
795 void HTMLFrame::OnConnect(web_view::mojom::FramePtr frame, | 795 void HTMLFrame::OnConnect( |
796 uint32_t change_id, | 796 web_view::mojom::FramePtr frame, |
797 uint32_t window_id, | 797 uint32_t change_id, |
798 web_view::mojom::ViewConnectType window_connect_type, | 798 uint32_t window_id, |
799 mojo::Array<web_view::mojom::FrameDataPtr> frame_data, | 799 web_view::mojom::WindowConnectType window_connect_type, |
800 int64_t navigation_start_time_ticks, | 800 mojo::Array<web_view::mojom::FrameDataPtr> frame_data, |
801 const OnConnectCallback& callback) { | 801 int64_t navigation_start_time_ticks, |
| 802 const OnConnectCallback& callback) { |
802 // This is called if this frame is created by way of OnCreatedFrame(). | 803 // This is called if this frame is created by way of OnCreatedFrame(). |
803 callback.Run(); | 804 callback.Run(); |
804 } | 805 } |
805 | 806 |
806 void HTMLFrame::OnFrameAdded(uint32_t change_id, | 807 void HTMLFrame::OnFrameAdded(uint32_t change_id, |
807 web_view::mojom::FrameDataPtr frame_data) { | 808 web_view::mojom::FrameDataPtr frame_data) { |
808 frame_tree_manager_->ProcessOnFrameAdded(this, change_id, frame_data.Pass()); | 809 frame_tree_manager_->ProcessOnFrameAdded(this, change_id, frame_data.Pass()); |
809 } | 810 } |
810 | 811 |
811 void HTMLFrame::OnFrameRemoved(uint32_t change_id, uint32_t frame_id) { | 812 void HTMLFrame::OnFrameRemoved(uint32_t change_id, uint32_t frame_id) { |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1025 if (!surface_layer_) | 1026 if (!surface_layer_) |
1026 return; | 1027 return; |
1027 | 1028 |
1028 surface_layer_->SetSurfaceId( | 1029 surface_layer_->SetSurfaceId( |
1029 cc::SurfaceId(owned_window_->window()->id()), | 1030 cc::SurfaceId(owned_window_->window()->id()), |
1030 global_state()->device_pixel_ratio(), | 1031 global_state()->device_pixel_ratio(), |
1031 owned_window_->window()->bounds().To<gfx::Rect>().size()); | 1032 owned_window_->window()->bounds().To<gfx::Rect>().size()); |
1032 } | 1033 } |
1033 | 1034 |
1034 } // namespace mojo | 1035 } // namespace mojo |
OLD | NEW |