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