OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 // This file contains the implementation of TestWebViewDelegate, which serves | 5 // This file contains the implementation of TestWebViewDelegate, which serves |
6 // as the WebViewDelegate for the TestShellWebHost. The host is expected to | 6 // as the WebViewDelegate for the TestShellWebHost. The host is expected to |
7 // have initialized a MessageLoop before these methods are called. | 7 // have initialized a MessageLoop before these methods are called. |
8 | 8 |
9 #include "config.h" | 9 #include "config.h" |
10 | 10 |
(...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
887 // Public methods ------------------------------------------------------------ | 887 // Public methods ------------------------------------------------------------ |
888 | 888 |
889 TestWebViewDelegate::TestWebViewDelegate(TestShell* shell) | 889 TestWebViewDelegate::TestWebViewDelegate(TestShell* shell) |
890 : policy_delegate_enabled_(false), | 890 : policy_delegate_enabled_(false), |
891 policy_delegate_is_permissive_(false), | 891 policy_delegate_is_permissive_(false), |
892 policy_delegate_should_notify_done_(false), | 892 policy_delegate_should_notify_done_(false), |
893 shell_(shell), | 893 shell_(shell), |
894 top_loading_frame_(NULL), | 894 top_loading_frame_(NULL), |
895 page_id_(-1), | 895 page_id_(-1), |
896 last_page_id_updated_(-1), | 896 last_page_id_updated_(-1), |
| 897 using_fake_rect_(false), |
897 #if defined(OS_LINUX) | 898 #if defined(OS_LINUX) |
898 cursor_type_(GDK_X_CURSOR), | 899 cursor_type_(GDK_X_CURSOR), |
899 #endif | 900 #endif |
900 smart_insert_delete_enabled_(true), | 901 smart_insert_delete_enabled_(true), |
901 #if defined(OS_WIN) | 902 #if defined(OS_WIN) |
902 select_trailing_whitespace_enabled_(true), | 903 select_trailing_whitespace_enabled_(true), |
903 #else | 904 #else |
904 select_trailing_whitespace_enabled_(false), | 905 select_trailing_whitespace_enabled_(false), |
905 #endif | 906 #endif |
906 block_redirects_(false) { | 907 block_redirects_(false) { |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1067 return L"main frame \"" + name + L"\""; | 1068 return L"main frame \"" + name + L"\""; |
1068 else | 1069 else |
1069 return L"main frame"; | 1070 return L"main frame"; |
1070 } else { | 1071 } else { |
1071 if (name.length()) | 1072 if (name.length()) |
1072 return L"frame \"" + name + L"\""; | 1073 return L"frame \"" + name + L"\""; |
1073 else | 1074 else |
1074 return L"frame (anonymous)"; | 1075 return L"frame (anonymous)"; |
1075 } | 1076 } |
1076 } | 1077 } |
| 1078 |
| 1079 void TestWebViewDelegate::setFakeWindowRect(const WebRect& rect) { |
| 1080 fake_rect_ = rect; |
| 1081 using_fake_rect_ = true; |
| 1082 } |
| 1083 |
| 1084 WebRect TestWebViewDelegate::getFakeWindowRect() { |
| 1085 return fake_rect_; |
| 1086 } |
OLD | NEW |