| 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 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 | 480 |
| 481 // Returns the TextSelection information for the active widget. If | 481 // Returns the TextSelection information for the active widget. If |
| 482 // |is_guest_view_hack_| is true, then it will return the TextSelection | 482 // |is_guest_view_hack_| is true, then it will return the TextSelection |
| 483 // information for this RenderWidgetHostViewMac (which is serving as a | 483 // information for this RenderWidgetHostViewMac (which is serving as a |
| 484 // platform view for a guest). | 484 // platform view for a guest). |
| 485 const TextInputManager::TextSelection* GetTextSelection(); | 485 const TextInputManager::TextSelection* GetTextSelection(); |
| 486 | 486 |
| 487 // Get the focused view that should be used for retrieving the text selection. | 487 // Get the focused view that should be used for retrieving the text selection. |
| 488 RenderWidgetHostViewBase* GetFocusedViewForTextSelection(); | 488 RenderWidgetHostViewBase* GetFocusedViewForTextSelection(); |
| 489 | 489 |
| 490 // Returns the RenderWidgetHostDelegate corresponding to the currently focused |
| 491 // RenderWidgetHost. It is different from |render_widget_host_->delegate()| |
| 492 // when there are focused inner WebContentses on the page. Also, this method |
| 493 // can return nullptr; for instance when |render_widget_host_| becomes nullptr |
| 494 // in the destruction path of the WebContentsImpl. |
| 495 RenderWidgetHostDelegate* GetFocusedRenderWidgetHostDelegate(); |
| 496 |
| 490 private: | 497 private: |
| 491 friend class RenderWidgetHostViewMacTest; | 498 friend class RenderWidgetHostViewMacTest; |
| 492 | 499 |
| 493 // Returns whether this render view is a popup (autocomplete window). | 500 // Returns whether this render view is a popup (autocomplete window). |
| 494 bool IsPopup() const; | 501 bool IsPopup() const; |
| 495 | 502 |
| 496 // Shuts down the render_widget_host_. This is a separate function so we can | 503 // Shuts down the render_widget_host_. This is a separate function so we can |
| 497 // invoke it from the message loop. | 504 // invoke it from the message loop. |
| 498 void ShutdownHost(); | 505 void ShutdownHost(); |
| 499 | 506 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 | 566 |
| 560 // Factory used to safely scope delayed calls to ShutdownHost(). | 567 // Factory used to safely scope delayed calls to ShutdownHost(). |
| 561 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; | 568 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; |
| 562 | 569 |
| 563 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); | 570 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); |
| 564 }; | 571 }; |
| 565 | 572 |
| 566 } // namespace content | 573 } // namespace content |
| 567 | 574 |
| 568 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 575 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
| OLD | NEW |