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 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 #include <list> | 9 #include <list> |
10 #include <map> | 10 #include <map> |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 void SetTextInputActive(bool active); | 318 void SetTextInputActive(bool active); |
319 | 319 |
320 // Sends completed plugin IME notification and text back to the renderer. | 320 // Sends completed plugin IME notification and text back to the renderer. |
321 void PluginImeCompositionCompleted(const string16& text, int plugin_id); | 321 void PluginImeCompositionCompleted(const string16& text, int plugin_id); |
322 | 322 |
323 const std::string& selected_text() const { return selected_text_; } | 323 const std::string& selected_text() const { return selected_text_; } |
324 | 324 |
325 // Call setNeedsDisplay on the cocoa_view_. The IOSurface will be drawn during | 325 // Call setNeedsDisplay on the cocoa_view_. The IOSurface will be drawn during |
326 // the next drawRect. Return true if the Ack should be sent, false if it | 326 // the next drawRect. Return true if the Ack should be sent, false if it |
327 // should be deferred until drawRect. | 327 // should be deferred until drawRect. |
328 bool CompositorSwapBuffers(uint64 surface_handle, const gfx::Size& size); | 328 bool CompositorSwapBuffers( |
| 329 uint64 surface_handle, const gfx::Size& size, float scale_factor); |
329 // Ack pending SwapBuffers requests, if any, to unblock the GPU process. Has | 330 // Ack pending SwapBuffers requests, if any, to unblock the GPU process. Has |
330 // no effect if there are no pending requests. | 331 // no effect if there are no pending requests. |
331 void AckPendingSwapBuffers(); | 332 void AckPendingSwapBuffers(); |
332 | 333 |
333 // Returns true and stores first rectangle for character range if the | 334 // Returns true and stores first rectangle for character range if the |
334 // requested |range| is already cached, otherwise returns false. | 335 // requested |range| is already cached, otherwise returns false. |
335 // Exposed for testing. | 336 // Exposed for testing. |
336 CONTENT_EXPORT bool GetCachedFirstRectForCharacterRange( | 337 CONTENT_EXPORT bool GetCachedFirstRectForCharacterRange( |
337 NSRange range, NSRect* rect, NSRange* actual_range); | 338 NSRange range, NSRect* rect, NSRange* actual_range); |
338 | 339 |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 | 492 |
492 // Subscriber that listens to frame presentation events. | 493 // Subscriber that listens to frame presentation events. |
493 scoped_ptr<RenderWidgetHostViewFrameSubscriber> frame_subscriber_; | 494 scoped_ptr<RenderWidgetHostViewFrameSubscriber> frame_subscriber_; |
494 | 495 |
495 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); | 496 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); |
496 }; | 497 }; |
497 | 498 |
498 } // namespace content | 499 } // namespace content |
499 | 500 |
500 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 501 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
OLD | NEW |