OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/path_service.h" | 5 #include "base/path_service.h" |
6 #include "base/strings/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
7 #include "content/browser/child_process_security_policy_impl.h" | 7 #include "content/browser/child_process_security_policy_impl.h" |
8 #include "content/browser/renderer_host/test_render_view_host.h" | 8 #include "content/browser/renderer_host/test_render_view_host.h" |
9 #include "content/browser/web_contents/navigation_controller_impl.h" | 9 #include "content/browser/web_contents/navigation_controller_impl.h" |
10 #include "content/common/input_messages.h" | 10 #include "content/common/input_messages.h" |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 WebKit::WebDragOperationsMask allowed_ops, | 129 WebKit::WebDragOperationsMask allowed_ops, |
130 const gfx::ImageSkia& image, | 130 const gfx::ImageSkia& image, |
131 const gfx::Vector2d& image_offset, | 131 const gfx::Vector2d& image_offset, |
132 const DragEventSourceInfo& event_info) OVERRIDE { | 132 const DragEventSourceInfo& event_info) OVERRIDE { |
133 drag_url_ = drop_data.url; | 133 drag_url_ = drop_data.url; |
134 html_base_url_ = drop_data.html_base_url; | 134 html_base_url_ = drop_data.html_base_url; |
135 } | 135 } |
136 virtual void UpdateDragCursor(WebKit::WebDragOperation operation) OVERRIDE {} | 136 virtual void UpdateDragCursor(WebKit::WebDragOperation operation) OVERRIDE {} |
137 virtual void GotFocus() OVERRIDE {} | 137 virtual void GotFocus() OVERRIDE {} |
138 virtual void TakeFocus(bool reverse) OVERRIDE {} | 138 virtual void TakeFocus(bool reverse) OVERRIDE {} |
| 139 virtual bool GrabSnapshot(const std::string& format, |
| 140 int quality, |
| 141 double scale, |
| 142 std::vector<uint8>* data) OVERRIDE { return false; } |
139 virtual void UpdatePreferredSize(const gfx::Size& pref_size) {} | 143 virtual void UpdatePreferredSize(const gfx::Size& pref_size) {} |
140 | 144 |
141 GURL drag_url() { | 145 GURL drag_url() { |
142 return drag_url_; | 146 return drag_url_; |
143 } | 147 } |
144 | 148 |
145 GURL html_base_url() { | 149 GURL html_base_url() { |
146 return html_base_url_; | 150 return html_base_url_; |
147 } | 151 } |
148 | 152 |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 test_rvh()->SendNavigateWithFile(1, url, file_path); | 286 test_rvh()->SendNavigateWithFile(1, url, file_path); |
283 EXPECT_EQ(1, process()->bad_msg_count()); | 287 EXPECT_EQ(1, process()->bad_msg_count()); |
284 | 288 |
285 ChildProcessSecurityPolicyImpl::GetInstance()->GrantReadFile( | 289 ChildProcessSecurityPolicyImpl::GetInstance()->GrantReadFile( |
286 process()->GetID(), file_path); | 290 process()->GetID(), file_path); |
287 test_rvh()->SendNavigateWithFile(process()->GetID(), url, file_path); | 291 test_rvh()->SendNavigateWithFile(process()->GetID(), url, file_path); |
288 EXPECT_EQ(1, process()->bad_msg_count()); | 292 EXPECT_EQ(1, process()->bad_msg_count()); |
289 } | 293 } |
290 | 294 |
291 } // namespace content | 295 } // namespace content |
OLD | NEW |