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/browser_plugin/browser_plugin_guest.h" | 5 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 gfx::Rect guest_rect(bounds); | 335 gfx::Rect guest_rect(bounds); |
336 guest_rect.Offset(guest_window_rect_.OffsetFromOrigin()); | 336 guest_rect.Offset(guest_window_rect_.OffsetFromOrigin()); |
337 return guest_rect; | 337 return guest_rect; |
338 } | 338 } |
339 | 339 |
340 void BrowserPluginGuest::EmbedderVisibilityChanged(bool visible) { | 340 void BrowserPluginGuest::EmbedderVisibilityChanged(bool visible) { |
341 embedder_visible_ = visible; | 341 embedder_visible_ = visible; |
342 UpdateVisibility(); | 342 UpdateVisibility(); |
343 } | 343 } |
344 | 344 |
345 void BrowserPluginGuest::SetZoom(double zoom_factor) { | |
346 if (delegate_) | |
347 delegate_->SetZoom(zoom_factor); | |
348 } | |
349 | |
350 void BrowserPluginGuest::PointerLockPermissionResponse(bool allow) { | 345 void BrowserPluginGuest::PointerLockPermissionResponse(bool allow) { |
351 SendMessageToEmbedder( | 346 SendMessageToEmbedder( |
352 new BrowserPluginMsg_SetMouseLock(instance_id(), allow)); | 347 new BrowserPluginMsg_SetMouseLock(instance_id(), allow)); |
353 } | 348 } |
354 | 349 |
355 WebContentsImpl* BrowserPluginGuest::GetWebContents() const { | 350 WebContentsImpl* BrowserPluginGuest::GetWebContents() const { |
356 return static_cast<WebContentsImpl*>(web_contents()); | 351 return static_cast<WebContentsImpl*>(web_contents()); |
357 } | 352 } |
358 | 353 |
359 gfx::Point BrowserPluginGuest::GetScreenCoordinates( | 354 gfx::Point BrowserPluginGuest::GetScreenCoordinates( |
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
949 void BrowserPluginGuest::OnImeCompositionRangeChanged( | 944 void BrowserPluginGuest::OnImeCompositionRangeChanged( |
950 const gfx::Range& range, | 945 const gfx::Range& range, |
951 const std::vector<gfx::Rect>& character_bounds) { | 946 const std::vector<gfx::Rect>& character_bounds) { |
952 static_cast<RenderWidgetHostViewBase*>( | 947 static_cast<RenderWidgetHostViewBase*>( |
953 web_contents()->GetRenderWidgetHostView())->ImeCompositionRangeChanged( | 948 web_contents()->GetRenderWidgetHostView())->ImeCompositionRangeChanged( |
954 range, character_bounds); | 949 range, character_bounds); |
955 } | 950 } |
956 #endif | 951 #endif |
957 | 952 |
958 } // namespace content | 953 } // namespace content |
OLD | NEW |