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

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

Issue 428783008: GetActiveUserProfile() should not be called before profile is initialized. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment on GetProfile added. Created 6 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/input_method/input_method_engine.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_H_
6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_H_ 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 #include "base/time/time.h" 11 #include "base/time/time.h"
12 #include "chrome/browser/chromeos/input_method/input_method_engine_interface.h" 12 #include "chrome/browser/chromeos/input_method/input_method_engine_interface.h"
13 #include "chromeos/ime/input_method_descriptor.h" 13 #include "chromeos/ime/input_method_descriptor.h"
14 #include "url/gurl.h" 14 #include "url/gurl.h"
15 15
16 class Profile;
17
16 namespace ui { 18 namespace ui {
17 class CandidateWindow; 19 class CandidateWindow;
18 class KeyEvent; 20 class KeyEvent;
19 } // namespace ui 21 } // namespace ui
20 22
21 namespace ash { 23 namespace ash {
22 namespace ime { 24 namespace ime {
23 struct InputMethodMenuItem; 25 struct InputMethodMenuItem;
24 } // namespace ime 26 } // namespace ime
25 } // namespace ash 27 } // namespace ash
26 28
27 namespace chromeos { 29 namespace chromeos {
28 30
29 class CompositionText; 31 class CompositionText;
30 32
31 namespace input_method { 33 namespace input_method {
32 struct KeyEventHandle; 34 struct KeyEventHandle;
33 } // namespace input_method 35 } // namespace input_method
34 36
35 class InputMethodEngine : public InputMethodEngineInterface { 37 class InputMethodEngine : public InputMethodEngineInterface {
36 public: 38 public:
37 InputMethodEngine(); 39 InputMethodEngine();
38 40
39 virtual ~InputMethodEngine(); 41 virtual ~InputMethodEngine();
40 42
41 void Initialize(scoped_ptr<InputMethodEngineInterface::Observer> observer, 43 void Initialize(Profile* profile,
44 scoped_ptr<InputMethodEngineInterface::Observer> observer,
42 const char* engine_name, 45 const char* engine_name,
43 const char* extension_id, 46 const char* extension_id,
44 const char* engine_id, 47 const char* engine_id,
45 const std::vector<std::string>& languages, 48 const std::vector<std::string>& languages,
46 const std::vector<std::string>& layouts, 49 const std::vector<std::string>& layouts,
47 const GURL& options_page, 50 const GURL& options_page,
48 const GURL& input_view); 51 const GURL& input_view);
49 52
50 // InputMethodEngineInterface overrides. 53 // InputMethodEngineInterface overrides.
51 virtual const input_method::InputMethodDescriptor& GetDescriptor() 54 virtual const input_method::InputMethodDescriptor& GetDescriptor()
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 // Used for input view window. 158 // Used for input view window.
156 GURL input_view_url_; 159 GURL input_view_url_;
157 160
158 // Used with SendKeyEvents and ProcessKeyEvent to check if the key event 161 // Used with SendKeyEvents and ProcessKeyEvent to check if the key event
159 // sent to ProcessKeyEvent is sent by SendKeyEvents. 162 // sent to ProcessKeyEvent is sent by SendKeyEvents.
160 const ui::KeyEvent* sent_key_event_; 163 const ui::KeyEvent* sent_key_event_;
161 164
162 // The start & end time of using this input method. This is for UMA. 165 // The start & end time of using this input method. This is for UMA.
163 base::Time start_time_; 166 base::Time start_time_;
164 base::Time end_time_; 167 base::Time end_time_;
168
169 // User profile that owns this method.
170 Profile* profile_;
165 }; 171 };
166 172
167 } // namespace chromeos 173 } // namespace chromeos
168 174
169 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_H_ 175 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/input_method/input_method_engine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698