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

Side by Side Diff: content/renderer/text_input_client_observer.h

Issue 2422973003: Fix TextInputClientMac related crashes of Fullscreen RenderWidget (Closed)
Patch Set: Created 4 years, 2 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_RENDERER_TEXT_INPUT_CLIENT_OBSERVER_H_ 5 #ifndef CONTENT_RENDERER_TEXT_INPUT_CLIENT_OBSERVER_H_
6 #define CONTENT_RENDERER_TEXT_INPUT_CLIENT_OBSERVER_H_ 6 #define CONTENT_RENDERER_TEXT_INPUT_CLIENT_OBSERVER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "content/public/renderer/render_view_observer.h" 10 #include "content/public/renderer/render_view_observer.h"
(...skipping 18 matching lines...) Expand all
29 explicit TextInputClientObserver(RenderWidget* render_widget); 29 explicit TextInputClientObserver(RenderWidget* render_widget);
30 ~TextInputClientObserver() override; 30 ~TextInputClientObserver() override;
31 31
32 // IPC::Listener override. 32 // IPC::Listener override.
33 bool OnMessageReceived(const IPC::Message& message) override; 33 bool OnMessageReceived(const IPC::Message& message) override;
34 34
35 // IPC::Sender override. 35 // IPC::Sender override.
36 bool Send(IPC::Message* message) override; 36 bool Send(IPC::Message* message) override;
37 37
38 private: 38 private:
39 // The render widget corresponding to this TextInputClientObserver. 39 // Returns the WebFrameWidget for the RenderWidget owning this observer. It
40 // returns null if the RenderWidget corresponds to a fullscreen RenderWidget.
40 blink::WebFrameWidget* GetWebFrameWidget() const; 41 blink::WebFrameWidget* GetWebFrameWidget() const;
41 42
42 blink::WebLocalFrame* GetFocusedFrame() const; 43 blink::WebLocalFrame* GetFocusedFrame() const;
43 44
44 #if defined(ENABLE_PLUGINS) 45 #if defined(ENABLE_PLUGINS)
45 // Returns the currently focused pepper plugin on the page. The expectation is 46 // Returns the currently focused pepper plugin on the page. The expectation is
46 // that the focused pepper plugin is inside a frame whose local root is equal 47 // that the focused pepper plugin is inside a frame whose local root is equal
47 // to GetWebFrameWidget()->localRoot(). 48 // to GetWebFrameWidget()->localRoot().
48 PepperPluginInstanceImpl* GetFocusedPepperPlugin() const; 49 PepperPluginInstanceImpl* GetFocusedPepperPlugin() const;
49 #endif 50 #endif
50 51
51 // IPC Message handlers: 52 // IPC Message handlers:
52 void OnStringAtPoint(gfx::Point point); 53 void OnStringAtPoint(gfx::Point point);
53 void OnCharacterIndexForPoint(gfx::Point point); 54 void OnCharacterIndexForPoint(gfx::Point point);
54 void OnFirstRectForCharacterRange(gfx::Range range); 55 void OnFirstRectForCharacterRange(gfx::Range range);
55 void OnStringForRange(gfx::Range range); 56 void OnStringForRange(gfx::Range range);
56 57
57 // The RenderWidget owning this instance of the observer. 58 // The RenderWidget owning this instance of the observer.
58 RenderWidget* render_widget_; 59 RenderWidget* render_widget_;
59 60
60 DISALLOW_COPY_AND_ASSIGN(TextInputClientObserver); 61 DISALLOW_COPY_AND_ASSIGN(TextInputClientObserver);
61 }; 62 };
62 63
63 } // namespace content 64 } // namespace content
64 65
65 #endif // CONTENT_RENDERER_TEXT_INPUT_CLIENT_OBSERVER_H_ 66 #endif // CONTENT_RENDERER_TEXT_INPUT_CLIENT_OBSERVER_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/text_input_client_observer.cc » ('j') | content/renderer/text_input_client_observer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698