| 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 <IOSurface/IOSurface.h> | 9 #include <IOSurface/IOSurface.h> |
| 10 #include <stddef.h> | 10 #include <stddef.h> |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 base::TimeTicks* timebase, base::TimeDelta* interval) const override; | 469 base::TimeTicks* timebase, base::TimeDelta* interval) const override; |
| 470 void AcceleratedWidgetSwapCompleted() override; | 470 void AcceleratedWidgetSwapCompleted() override; |
| 471 | 471 |
| 472 // Exposed for testing. | 472 // Exposed for testing. |
| 473 cc::SurfaceId SurfaceIdForTesting() const override; | 473 cc::SurfaceId SurfaceIdForTesting() const override; |
| 474 | 474 |
| 475 // Helper method to obtain ui::TextInputType for the active widget from the | 475 // Helper method to obtain ui::TextInputType for the active widget from the |
| 476 // TextInputManager. | 476 // TextInputManager. |
| 477 ui::TextInputType GetTextInputType(); | 477 ui::TextInputType GetTextInputType(); |
| 478 | 478 |
| 479 // Helper method to obtain the currently active widget from TextInputManager. |
| 480 // An active widget is a RenderWidget which is currently focused and has a |
| 481 // |TextInputState.type| which is not ui::TEXT_INPUT_TYPE_NONE. |
| 482 RenderWidgetHostImpl* GetActiveWidget(); |
| 483 |
| 479 private: | 484 private: |
| 480 friend class RenderWidgetHostViewMacTest; | 485 friend class RenderWidgetHostViewMacTest; |
| 481 | 486 |
| 482 // Returns whether this render view is a popup (autocomplete window). | 487 // Returns whether this render view is a popup (autocomplete window). |
| 483 bool IsPopup() const; | 488 bool IsPopup() const; |
| 484 | 489 |
| 485 // Shuts down the render_widget_host_. This is a separate function so we can | 490 // Shuts down the render_widget_host_. This is a separate function so we can |
| 486 // invoke it from the message loop. | 491 // invoke it from the message loop. |
| 487 void ShutdownHost(); | 492 void ShutdownHost(); |
| 488 | 493 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 | 553 |
| 549 // Factory used to safely scope delayed calls to ShutdownHost(). | 554 // Factory used to safely scope delayed calls to ShutdownHost(). |
| 550 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; | 555 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; |
| 551 | 556 |
| 552 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); | 557 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); |
| 553 }; | 558 }; |
| 554 | 559 |
| 555 } // namespace content | 560 } // namespace content |
| 556 | 561 |
| 557 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 562 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
| OLD | NEW |