| 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/web_view/frame.h" | 5 #include "components/web_view/frame.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 | 159 |
| 160 if (!on_loading_state_changed_callback_.is_null()) | 160 if (!on_loading_state_changed_callback_.is_null()) |
| 161 on_loading_state_changed_callback_.Run(); | 161 on_loading_state_changed_callback_.Run(); |
| 162 } | 162 } |
| 163 void OnDispatchFrameLoadEvent(uint32_t frame_id) override { | 163 void OnDispatchFrameLoadEvent(uint32_t frame_id) override { |
| 164 last_dispatch_load_event_frame_id_ = frame_id; | 164 last_dispatch_load_event_frame_id_ = frame_id; |
| 165 | 165 |
| 166 if (!on_dispatch_load_event_callback_.is_null()) | 166 if (!on_dispatch_load_event_callback_.is_null()) |
| 167 on_dispatch_load_event_callback_.Run(); | 167 on_dispatch_load_event_callback_.Run(); |
| 168 } | 168 } |
| 169 void OnFind(int32_t request_id, const mojo::String& search_text) override {} |
| 170 void OnStopFinding() override {} |
| 169 | 171 |
| 170 private: | 172 private: |
| 171 struct LoadingStateChangedNotification { | 173 struct LoadingStateChangedNotification { |
| 172 LoadingStateChangedNotification() : frame_id(0), loading(false) {} | 174 LoadingStateChangedNotification() : frame_id(0), loading(false) {} |
| 173 ~LoadingStateChangedNotification() {} | 175 ~LoadingStateChangedNotification() {} |
| 174 | 176 |
| 175 uint32_t frame_id; | 177 uint32_t frame_id; |
| 176 bool loading; | 178 bool loading; |
| 177 }; | 179 }; |
| 178 | 180 |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 child_view_and_frame->server_frame()->DispatchLoadEventToParent(); | 516 child_view_and_frame->server_frame()->DispatchLoadEventToParent(); |
| 515 | 517 |
| 516 run_loop.Run(); | 518 run_loop.Run(); |
| 517 | 519 |
| 518 uint32_t frame_id = root_view_and_frame() | 520 uint32_t frame_id = root_view_and_frame() |
| 519 ->test_frame_client() | 521 ->test_frame_client() |
| 520 ->last_dispatch_load_event_frame_id(); | 522 ->last_dispatch_load_event_frame_id(); |
| 521 EXPECT_EQ(child_frame_id, frame_id); | 523 EXPECT_EQ(child_frame_id, frame_id); |
| 522 } | 524 } |
| 523 } // namespace web_view | 525 } // namespace web_view |
| OLD | NEW |