Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_mac.h

Issue 2817673003: Making Mac Dictionary better for OOPIFs and <webview> (Closed)
Patch Set: Remove ScopedBrowserClient Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 // Returns the composition range information for the active RenderWidgetHost 477 // Returns the composition range information for the active RenderWidgetHost
478 // (accepting IME and keyboard input). 478 // (accepting IME and keyboard input).
479 const TextInputManager::CompositionRangeInfo* GetCompositionRangeInfo(); 479 const TextInputManager::CompositionRangeInfo* GetCompositionRangeInfo();
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.
488 RenderWidgetHostViewBase* GetFocusedViewForTextSelection();
489
487 private: 490 private:
488 friend class RenderWidgetHostViewMacTest; 491 friend class RenderWidgetHostViewMacTest;
489 492
490 // Returns whether this render view is a popup (autocomplete window). 493 // Returns whether this render view is a popup (autocomplete window).
491 bool IsPopup() const; 494 bool IsPopup() const;
492 495
493 // Shuts down the render_widget_host_. This is a separate function so we can 496 // Shuts down the render_widget_host_. This is a separate function so we can
494 // invoke it from the message loop. 497 // invoke it from the message loop.
495 void ShutdownHost(); 498 void ShutdownHost();
496 499
497 // IPC message handlers. 500 // IPC message handlers.
498 void OnGetRenderedTextCompleted(const std::string& text); 501 void OnGetRenderedTextCompleted(const std::string& text);
499 502
500 // Send updated vsync parameters to the top level display. 503 // Send updated vsync parameters to the top level display.
501 void UpdateDisplayVSyncParameters(); 504 void UpdateDisplayVSyncParameters();
502 505
503 // Dispatches a TTS session. 506 // Dispatches a TTS session.
504 void SpeakText(const std::string& text); 507 void SpeakText(const std::string& text);
505 508
506 // Get the focused view that should be used for retrieving the text selection.
507 RenderWidgetHostViewBase* GetFocusedViewForTextSelection();
508
509 // Adds/Removes frame observer based on state. 509 // Adds/Removes frame observer based on state.
510 void UpdateNeedsBeginFramesInternal(); 510 void UpdateNeedsBeginFramesInternal();
511 511
512 // The associated view. This is weak and is inserted into the view hierarchy 512 // The associated view. This is weak and is inserted into the view hierarchy
513 // to own this RenderWidgetHostViewMac object. Set to nil at the start of the 513 // to own this RenderWidgetHostViewMac object. Set to nil at the start of the
514 // destructor. 514 // destructor.
515 RenderWidgetHostViewCocoa* cocoa_view_; 515 RenderWidgetHostViewCocoa* cocoa_view_;
516 516
517 // Indicates if the page is loading. 517 // Indicates if the page is loading.
518 bool is_loading_; 518 bool is_loading_;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 561
562 // Factory used to safely scope delayed calls to ShutdownHost(). 562 // Factory used to safely scope delayed calls to ShutdownHost().
563 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; 563 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_;
564 564
565 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); 565 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac);
566 }; 566 };
567 567
568 } // namespace content 568 } // namespace content
569 569
570 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 570 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698