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

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

Issue 2278283002: Implement Mac Pop-up Dictionary for OOPIF. (Closed)
Patch Set: Addressing lfg@'s comment Created 4 years, 3 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 22 matching lines...) Expand all
33 #include "ipc/ipc_sender.h" 33 #include "ipc/ipc_sender.h"
34 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" 34 #include "third_party/WebKit/public/web/WebCompositionUnderline.h"
35 #include "ui/accelerated_widget_mac/accelerated_widget_mac.h" 35 #include "ui/accelerated_widget_mac/accelerated_widget_mac.h"
36 #include "ui/accelerated_widget_mac/display_link_mac.h" 36 #include "ui/accelerated_widget_mac/display_link_mac.h"
37 #import "ui/base/cocoa/command_dispatcher.h" 37 #import "ui/base/cocoa/command_dispatcher.h"
38 #include "ui/base/cocoa/remote_layer_api.h" 38 #include "ui/base/cocoa/remote_layer_api.h"
39 #import "ui/base/cocoa/tool_tip_base_view.h" 39 #import "ui/base/cocoa/tool_tip_base_view.h"
40 #include "ui/display/display_observer.h" 40 #include "ui/display/display_observer.h"
41 41
42 namespace content { 42 namespace content {
43 class RenderWidgetHost;
Charlie Reis 2016/09/02 21:57:47 Stale?
EhsanK 2016/09/08 17:10:40 Based on my changes, yes. But I think we should ke
43 class RenderWidgetHostImpl; 44 class RenderWidgetHostImpl;
44 class RenderWidgetHostViewMac; 45 class RenderWidgetHostViewMac;
45 class RenderWidgetHostViewMacEditCommandHelper; 46 class RenderWidgetHostViewMacEditCommandHelper;
46 class WebContents; 47 class WebContents;
47 struct TextInputState; 48 struct TextInputState;
48 } 49 }
49 50
50 namespace ui { 51 namespace ui {
51 class Compositor; 52 class Compositor;
52 class Layer; 53 class Layer;
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 469
469 // Helper method to obtain ui::TextInputType for the active widget from the 470 // Helper method to obtain ui::TextInputType for the active widget from the
470 // TextInputManager. 471 // TextInputManager.
471 ui::TextInputType GetTextInputType(); 472 ui::TextInputType GetTextInputType();
472 473
473 // Helper method to obtain the currently active widget from TextInputManager. 474 // Helper method to obtain the currently active widget from TextInputManager.
474 // An active widget is a RenderWidget which is currently focused and has a 475 // An active widget is a RenderWidget which is currently focused and has a
475 // |TextInputState.type| which is not ui::TEXT_INPUT_TYPE_NONE. 476 // |TextInputState.type| which is not ui::TEXT_INPUT_TYPE_NONE.
476 RenderWidgetHostImpl* GetActiveWidget(); 477 RenderWidgetHostImpl* GetActiveWidget();
477 478
479 // Returns the RenderWidgetHostImpl from hit testing at the given point of the
480 // |root_view|. This is used for TextInputClientMac communication with the
481 // right RenderWidgetHostImpl when showing the dictionary pop-up.
482 RenderWidgetHostImpl* GetRenderWidgetHostAtPoint(
kenrb 2016/09/06 18:14:48 I am not sure it is worth adding this method, rath
EhsanK 2016/09/08 17:10:39 Acknowledged.
483 const gfx::Point& point,
484 gfx::Point* transformed_point);
485
478 private: 486 private:
479 friend class RenderWidgetHostViewMacTest; 487 friend class RenderWidgetHostViewMacTest;
480 488
481 // Returns whether this render view is a popup (autocomplete window). 489 // Returns whether this render view is a popup (autocomplete window).
482 bool IsPopup() const; 490 bool IsPopup() const;
483 491
484 // Shuts down the render_widget_host_. This is a separate function so we can 492 // Shuts down the render_widget_host_. This is a separate function so we can
485 // invoke it from the message loop. 493 // invoke it from the message loop.
486 void ShutdownHost(); 494 void ShutdownHost();
487 495
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 549
542 // Factory used to safely scope delayed calls to ShutdownHost(). 550 // Factory used to safely scope delayed calls to ShutdownHost().
543 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; 551 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_;
544 552
545 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); 553 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac);
546 }; 554 };
547 555
548 } // namespace content 556 } // namespace content
549 557
550 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 558 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698