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 "content/browser/renderer_host/render_widget_host_view_mac.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_mac.h" |
6 | 6 |
7 #include "base/mac/scoped_nsautorelease_pool.h" | 7 #include "base/mac/scoped_nsautorelease_pool.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "content/browser/browser_thread_impl.h" | 9 #include "content/browser/browser_thread_impl.h" |
10 #include "content/browser/renderer_host/test_render_view_host.h" | 10 #include "content/browser/renderer_host/test_render_view_host.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 params.window = accelerated_handle; | 108 params.window = accelerated_handle; |
109 rwhv_mac_->AcceleratedSurfaceBuffersSwapped(params, 0); | 109 rwhv_mac_->AcceleratedSurfaceBuffersSwapped(params, 0); |
110 webkit::npapi::WebPluginGeometry geom; | 110 webkit::npapi::WebPluginGeometry geom; |
111 gfx::Rect rect(0, 0, w, h); | 111 gfx::Rect rect(0, 0, w, h); |
112 geom.window = accelerated_handle; | 112 geom.window = accelerated_handle; |
113 geom.window_rect = rect; | 113 geom.window_rect = rect; |
114 geom.clip_rect = rect; | 114 geom.clip_rect = rect; |
115 geom.visible = true; | 115 geom.visible = true; |
116 geom.rects_valid = true; | 116 geom.rects_valid = true; |
117 rwhv_mac_->MovePluginWindows( | 117 rwhv_mac_->MovePluginWindows( |
| 118 gfx::Point(), |
118 std::vector<webkit::npapi::WebPluginGeometry>(1, geom)); | 119 std::vector<webkit::npapi::WebPluginGeometry>(1, geom)); |
119 | 120 |
120 return accelerated_handle; | 121 return accelerated_handle; |
121 } | 122 } |
122 private: | 123 private: |
123 // This class isn't derived from PlatformTest. | 124 // This class isn't derived from PlatformTest. |
124 base::mac::ScopedNSAutoreleasePool pool_; | 125 base::mac::ScopedNSAutoreleasePool pool_; |
125 | 126 |
126 RenderWidgetHostView* old_rwhv_; | 127 RenderWidgetHostView* old_rwhv_; |
127 | 128 |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
570 range = ui::Range(10, 20); | 571 range = ui::Range(10, 20); |
571 EXPECT_TRUE(rwhv_mac_->GetCachedFirstRectForCharacterRange(range.ToNSRange(), | 572 EXPECT_TRUE(rwhv_mac_->GetCachedFirstRectForCharacterRange(range.ToNSRange(), |
572 &rect, | 573 &rect, |
573 &actual_range)); | 574 &actual_range)); |
574 EXPECT_EQ(ui::Range(10, 20), ui::Range(actual_range)); | 575 EXPECT_EQ(ui::Range(10, 20), ui::Range(actual_range)); |
575 EXPECT_EQ( | 576 EXPECT_EQ( |
576 GetExpectedRect(kOrigin, kBoundsUnit, ui::Range(0, 10), 1), | 577 GetExpectedRect(kOrigin, kBoundsUnit, ui::Range(0, 10), 1), |
577 gfx::Rect(NSRectToCGRect(rect))); | 578 gfx::Rect(NSRectToCGRect(rect))); |
578 } | 579 } |
579 } // namespace content | 580 } // namespace content |
OLD | NEW |