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

Side by Side Diff: content/browser/browser_plugin/browser_plugin_guest.h

Issue 103403006: Implement Input Method related WebPlugin interface for browser plugin (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Translate coordinates of parameter for ImeCompositionRangeChanged Created 7 years 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 | Annotate | Revision Log
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 // A BrowserPluginGuest is the browser side of a browser <--> embedder 5 // A BrowserPluginGuest is the browser side of a browser <--> embedder
6 // renderer channel. A BrowserPlugin (a WebPlugin) is on the embedder 6 // renderer channel. A BrowserPlugin (a WebPlugin) is on the embedder
7 // renderer side of browser <--> embedder renderer communication. 7 // renderer side of browser <--> embedder renderer communication.
8 // 8 //
9 // BrowserPluginGuest lives on the UI thread of the browser process. Any 9 // BrowserPluginGuest lives on the UI thread of the browser process. Any
10 // messages about the guest render process that the embedder might be interested 10 // messages about the guest render process that the embedder might be interested
(...skipping 15 matching lines...) Expand all
26 #include "base/memory/shared_memory.h" 26 #include "base/memory/shared_memory.h"
27 #include "base/memory/weak_ptr.h" 27 #include "base/memory/weak_ptr.h"
28 #include "base/values.h" 28 #include "base/values.h"
29 #include "content/common/edit_command.h" 29 #include "content/common/edit_command.h"
30 #include "content/port/common/input_event_ack_state.h" 30 #include "content/port/common/input_event_ack_state.h"
31 #include "content/public/browser/browser_plugin_guest_delegate.h" 31 #include "content/public/browser/browser_plugin_guest_delegate.h"
32 #include "content/public/browser/javascript_dialog_manager.h" 32 #include "content/public/browser/javascript_dialog_manager.h"
33 #include "content/public/browser/web_contents_delegate.h" 33 #include "content/public/browser/web_contents_delegate.h"
34 #include "content/public/browser/web_contents_observer.h" 34 #include "content/public/browser/web_contents_observer.h"
35 #include "content/public/common/browser_plugin_permission_type.h" 35 #include "content/public/common/browser_plugin_permission_type.h"
36 #include "third_party/WebKit/public/web/WebCompositionUnderline.h"
36 #include "third_party/WebKit/public/web/WebDragOperation.h" 37 #include "third_party/WebKit/public/web/WebDragOperation.h"
37 #include "third_party/WebKit/public/web/WebDragStatus.h" 38 #include "third_party/WebKit/public/web/WebDragStatus.h"
38 #include "third_party/WebKit/public/web/WebInputEvent.h" 39 #include "third_party/WebKit/public/web/WebInputEvent.h"
40 #include "ui/base/ime/text_input_mode.h"
41 #include "ui/base/ime/text_input_type.h"
39 #include "ui/gfx/rect.h" 42 #include "ui/gfx/rect.h"
40 #include "ui/surface/transport_dib.h" 43 #include "ui/surface/transport_dib.h"
41 44
42 struct BrowserPluginHostMsg_AutoSize_Params; 45 struct BrowserPluginHostMsg_AutoSize_Params;
43 struct BrowserPluginHostMsg_Attach_Params; 46 struct BrowserPluginHostMsg_Attach_Params;
44 struct BrowserPluginHostMsg_ResizeGuest_Params; 47 struct BrowserPluginHostMsg_ResizeGuest_Params;
45 struct ViewHostMsg_CreateWindow_Params; 48 struct ViewHostMsg_CreateWindow_Params;
46 #if defined(OS_MACOSX) 49 #if defined(OS_MACOSX)
47 struct ViewHostMsg_ShowPopup_Params; 50 struct ViewHostMsg_ShowPopup_Params;
48 #endif 51 #endif
49 struct ViewHostMsg_UpdateRect_Params; 52 struct ViewHostMsg_UpdateRect_Params;
50 class WebCursor; 53 class WebCursor;
51 54
52 namespace cc { 55 namespace cc {
53 class CompositorFrameAck; 56 class CompositorFrameAck;
54 } 57 }
55 58
56 namespace blink { 59 namespace blink {
57 class WebInputEvent; 60 class WebInputEvent;
58 } 61 }
59 62
63 namespace gfx {
64 class Range;
65 }
66
60 namespace content { 67 namespace content {
61 68
62 class BrowserPluginHostFactory; 69 class BrowserPluginHostFactory;
63 class BrowserPluginEmbedder; 70 class BrowserPluginEmbedder;
64 class BrowserPluginGuestManager; 71 class BrowserPluginGuestManager;
65 class RenderProcessHost; 72 class RenderProcessHost;
66 class RenderWidgetHostView; 73 class RenderWidgetHostView;
67 class SiteInstance; 74 class SiteInstance;
68 struct DropData; 75 struct DropData;
69 struct MediaStreamRequest; 76 struct MediaStreamRequest;
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 uint32 sync_point); 463 uint32 sync_point);
457 void OnUnlockMouse(); 464 void OnUnlockMouse();
458 void OnUnlockMouseAck(int instance_id); 465 void OnUnlockMouseAck(int instance_id);
459 void OnUpdateGeometry(int instance_id, const gfx::Rect& view_rect); 466 void OnUpdateGeometry(int instance_id, const gfx::Rect& view_rect);
460 void OnUpdateRectACK( 467 void OnUpdateRectACK(
461 int instance_id, 468 int instance_id,
462 bool needs_ack, 469 bool needs_ack,
463 const BrowserPluginHostMsg_AutoSize_Params& auto_size_params, 470 const BrowserPluginHostMsg_AutoSize_Params& auto_size_params,
464 const BrowserPluginHostMsg_ResizeGuest_Params& resize_guest_params); 471 const BrowserPluginHostMsg_ResizeGuest_Params& resize_guest_params);
465 472
473 void OnTextInputTypeChanged(ui::TextInputType type,
474 ui::TextInputMode input_mode,
475 bool can_compose_inline);
476 void OnImeSetComposition(
477 int instance_id,
478 const std::string& text,
479 const std::vector<blink::WebCompositionUnderline>& underlines,
480 int selection_start,
481 int selection_end);
482 void OnImeConfirmComposition(
483 int instance_id,
484 const std::string& text,
485 bool keep_selection);
486 void OnExtendSelectionAndDelete(int instance_id, int before, int after);
487 // Overridden in tests.
488 virtual void OnImeCancelComposition();
489 #if defined(OS_MACOSX) || defined(OS_WIN) || defined(USE_AURA)
490 void OnImeCompositionRangeChanged(
491 const gfx::Range& range,
492 const std::vector<gfx::Rect>& character_bounds);
493 #endif
466 494
467 // Message handlers for messages from guest. 495 // Message handlers for messages from guest.
468 496
469 void OnDragStopped(); 497 void OnDragStopped();
470 void OnHandleInputEventAck( 498 void OnHandleInputEventAck(
471 blink::WebInputEvent::Type event_type, 499 blink::WebInputEvent::Type event_type,
472 InputEventAckState ack_result); 500 InputEventAckState ack_result);
473 void OnHasTouchEventHandlers(bool accept); 501 void OnHasTouchEventHandlers(bool accept);
474 void OnSetCursor(const WebCursor& cursor); 502 void OnSetCursor(const WebCursor& cursor);
475 // On MacOSX popups are painted by the browser process. We handle them here 503 // On MacOSX popups are painted by the browser process. We handle them here
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 // These are parameters passed from JavaScript on attachment to the content 602 // These are parameters passed from JavaScript on attachment to the content
575 // embedder. 603 // embedder.
576 scoped_ptr<base::DictionaryValue> extra_attach_params_; 604 scoped_ptr<base::DictionaryValue> extra_attach_params_;
577 605
578 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); 606 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest);
579 }; 607 };
580 608
581 } // namespace content 609 } // namespace content
582 610
583 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ 611 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698