OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 20 matching lines...) Expand all Loading... |
31 #ifndef WebFrameWidget_h | 31 #ifndef WebFrameWidget_h |
32 #define WebFrameWidget_h | 32 #define WebFrameWidget_h |
33 | 33 |
34 #include "../platform/WebCommon.h" | 34 #include "../platform/WebCommon.h" |
35 #include "../platform/WebPageVisibilityState.h" | 35 #include "../platform/WebPageVisibilityState.h" |
36 #include "public/web/WebWidget.h" | 36 #include "public/web/WebWidget.h" |
37 | 37 |
38 namespace blink { | 38 namespace blink { |
39 | 39 |
40 class WebLocalFrame; | 40 class WebLocalFrame; |
| 41 class WebInputMethodController; |
41 class WebView; | 42 class WebView; |
42 class WebWidgetClient; | 43 class WebWidgetClient; |
43 | 44 |
44 class WebFrameWidget : public WebWidget { | 45 class WebFrameWidget : public WebWidget { |
45 public: | 46 public: |
46 BLINK_EXPORT static WebFrameWidget* create(WebWidgetClient*, WebLocalFrame*); | 47 BLINK_EXPORT static WebFrameWidget* create(WebWidgetClient*, WebLocalFrame*); |
47 // Creates a frame widget for a WebView. Temporary helper to help transition | 48 // Creates a frame widget for a WebView. Temporary helper to help transition |
48 // away from WebView inheriting WebWidget. | 49 // away from WebView inheriting WebWidget. |
49 // TODO(dcheng): Remove once transition is complete. | 50 // TODO(dcheng): Remove once transition is complete. |
50 BLINK_EXPORT static WebFrameWidget* create(WebWidgetClient*, | 51 BLINK_EXPORT static WebFrameWidget* create(WebWidgetClient*, |
(...skipping 19 matching lines...) Expand all Loading... |
70 // Setting this takes effect for the currently loaded page, if any, and | 71 // Setting this takes effect for the currently loaded page, if any, and |
71 // persists across subsequent navigations. Defaults to white prior to the | 72 // persists across subsequent navigations. Defaults to white prior to the |
72 // first call to this method. | 73 // first call to this method. |
73 virtual void setBaseBackgroundColor(WebColor) = 0; | 74 virtual void setBaseBackgroundColor(WebColor) = 0; |
74 | 75 |
75 // Returns the local root of this WebFrameWidget. | 76 // Returns the local root of this WebFrameWidget. |
76 virtual WebLocalFrame* localRoot() = 0; | 77 virtual WebLocalFrame* localRoot() = 0; |
77 | 78 |
78 // WebWidget implementation. | 79 // WebWidget implementation. |
79 bool isWebFrameWidget() const final { return true; } | 80 bool isWebFrameWidget() const final { return true; } |
| 81 |
| 82 // Current instance of the active WebInputMethodController, that is, the |
| 83 // WebInputMethodController corresponding to (and owned by) the focused |
| 84 // WebLocalFrameImpl. It might return nullptr when there are no focused |
| 85 // frames or possibly when the WebFrameWidget does not accept IME events. |
| 86 virtual WebInputMethodController* getActiveWebInputMethodController() |
| 87 const = 0; |
80 }; | 88 }; |
81 | 89 |
82 } // namespace blink | 90 } // namespace blink |
83 | 91 |
84 #endif | 92 #endif |
OLD | NEW |