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

Side by Side Diff: chrome/browser/ui/input_method/input_method_engine.h

Issue 1756853002: Correctly sets the security origin for the IME window. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed tests. Created 4 years, 9 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 CHROME_BROWSER_UI_INPUT_METHOD_INPUT_METHOD_ENGINE_H_ 5 #ifndef CHROME_BROWSER_UI_INPUT_METHOD_INPUT_METHOD_ENGINE_H_
6 #define CHROME_BROWSER_UI_INPUT_METHOD_INPUT_METHOD_ENGINE_H_ 6 #define CHROME_BROWSER_UI_INPUT_METHOD_INPUT_METHOD_ENGINE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "chrome/browser/ui/ime/ime_window.h" 11 #include "chrome/browser/ui/ime/ime_window.h"
12 #include "chrome/browser/ui/ime/ime_window_observer.h" 12 #include "chrome/browser/ui/ime/ime_window_observer.h"
13 #include "chrome/browser/ui/input_method/input_method_engine_base.h" 13 #include "chrome/browser/ui/input_method/input_method_engine_base.h"
14 14
15 namespace content {
16 class RenderFrameHost;
17 } // namespace content
18
15 namespace input_method { 19 namespace input_method {
16 20
17 class InputMethodEngine : public InputMethodEngineBase, 21 class InputMethodEngine : public InputMethodEngineBase,
18 public ui::ImeWindowObserver { 22 public ui::ImeWindowObserver {
19 public: 23 public:
20 InputMethodEngine(); 24 InputMethodEngine();
21 25
22 ~InputMethodEngine() override; 26 ~InputMethodEngine() override;
23 27
24 // ui::IMEEngineHandlerInterface: 28 // ui::IMEEngineHandlerInterface:
25 bool SendKeyEvents(int context_id, 29 bool SendKeyEvents(int context_id,
26 const std::vector<KeyboardEvent>& events) override; 30 const std::vector<KeyboardEvent>& events) override;
27 bool IsActive() const override; 31 bool IsActive() const override;
28 std::string GetExtensionId() const override; 32 std::string GetExtensionId() const override;
29 33
30 // Creates and shows the IME window. 34 // Creates and shows the IME window.
31 // Returns 0 for errors and |error| will contains the error message. 35 // Returns 0 for errors and |error| will contains the error message.
32 int CreateImeWindow(const extensions::Extension* extension, 36 int CreateImeWindow(const extensions::Extension* extension,
37 content::RenderFrameHost* render_frame_host,
33 const std::string& url, 38 const std::string& url,
34 ui::ImeWindow::Mode mode, 39 ui::ImeWindow::Mode mode,
35 const gfx::Rect& bounds, 40 const gfx::Rect& bounds,
36 std::string* error); 41 std::string* error);
37 42
38 void CloseImeWindows(); 43 void CloseImeWindows();
39 44
40 private: 45 private:
41 // input_method::InputMethodEngineBase: 46 // input_method::InputMethodEngineBase:
42 void FocusIn(const ui::IMEEngineHandlerInterface::InputContext& input_context) 47 void FocusIn(const ui::IMEEngineHandlerInterface::InputContext& input_context)
(...skipping 18 matching lines...) Expand all
61 // Tracks the current cursor bounds so that the new follow cursor window can 66 // Tracks the current cursor bounds so that the new follow cursor window can
62 // be aligned with cursor once it being created. 67 // be aligned with cursor once it being created.
63 gfx::Rect current_cursor_bounds_; 68 gfx::Rect current_cursor_bounds_;
64 69
65 DISALLOW_COPY_AND_ASSIGN(InputMethodEngine); 70 DISALLOW_COPY_AND_ASSIGN(InputMethodEngine);
66 }; 71 };
67 72
68 } // namespace input_method 73 } // namespace input_method
69 74
70 #endif // CHROME_BROWSER_UI_INPUT_METHOD_INPUT_METHOD_ENGINE_H_ 75 #endif // CHROME_BROWSER_UI_INPUT_METHOD_INPUT_METHOD_ENGINE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/ime/ime_window.cc ('k') | chrome/browser/ui/input_method/input_method_engine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698