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

Side by Side Diff: chromeos/ime/input_method_descriptor.h

Issue 14070014: Remove |third_party| from InputMethodDescriptor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
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 CHROMEOS_IME_INPUT_METHOD_DESCRIPTOR_H_ 5 #ifndef CHROMEOS_IME_INPUT_METHOD_DESCRIPTOR_H_
6 #define CHROMEOS_IME_INPUT_METHOD_DESCRIPTOR_H_ 6 #define CHROMEOS_IME_INPUT_METHOD_DESCRIPTOR_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "chromeos/chromeos_export.h" 12 #include "chromeos/chromeos_export.h"
13 13
14 namespace chromeos { 14 namespace chromeos {
15 namespace input_method { 15 namespace input_method {
16 16
17 class InputMethodWhitelist; 17 class InputMethodWhitelist;
18 18
19 // A structure which represents an input method. 19 // A structure which represents an input method.
20 class CHROMEOS_EXPORT InputMethodDescriptor { 20 class CHROMEOS_EXPORT InputMethodDescriptor {
21 public: 21 public:
22 InputMethodDescriptor(); 22 InputMethodDescriptor();
23 InputMethodDescriptor(const std::string& id, 23 InputMethodDescriptor(const std::string& id,
24 const std::string& name, 24 const std::string& name,
25 const std::string& keyboard_layout, 25 const std::string& keyboard_layout,
26 const std::string& language_code, 26 const std::string& language_code,
27 const std::string& options_page_url, 27 const std::string& options_page_url);
28 bool third_party);
29 ~InputMethodDescriptor(); 28 ~InputMethodDescriptor();
30 29
31 bool operator==(const InputMethodDescriptor& other) const; 30 bool operator==(const InputMethodDescriptor& other) const;
32 bool operator!=(const InputMethodDescriptor& other) const; 31 bool operator!=(const InputMethodDescriptor& other) const;
33 32
34 const std::string& id() const { return id_; } 33 const std::string& id() const { return id_; }
35 const std::string& name() const { return name_; } 34 const std::string& name() const { return name_; }
36 const std::string& keyboard_layout() const { return keyboard_layout_; } 35 const std::string& keyboard_layout() const { return keyboard_layout_; }
37 const std::string& language_code() const { return language_code_; } 36 const std::string& language_code() const { return language_code_; }
38 const std::string& options_page_url() const { return options_page_url_; } 37 const std::string& options_page_url() const { return options_page_url_; }
39 bool third_party() const { return third_party_; }
40 38
41 private: 39 private:
42 // An ID that identifies an input method engine (e.g., "t:latn-post", 40 // An ID that identifies an input method engine (e.g., "t:latn-post",
43 // "pinyin", "hangul"). 41 // "pinyin", "hangul").
44 std::string id_; 42 std::string id_;
45 // A name used to specify the user-visible name of this input method. It is 43 // A name used to specify the user-visible name of this input method. It is
46 // only used by extension IMEs, and should be blank for internal IMEs. 44 // only used by extension IMEs, and should be blank for internal IMEs.
47 std::string name_; 45 std::string name_;
48 // A preferred physical keyboard layout for the input method (e.g., "us", 46 // A preferred physical keyboard layout for the input method (e.g., "us",
49 // "us(dvorak)", "jp"). Comma separated layout names do NOT appear. 47 // "us(dvorak)", "jp"). Comma separated layout names do NOT appear.
50 std::string keyboard_layout_; 48 std::string keyboard_layout_;
51 // Language code like "ko", "ja", "en-US", and "zh-CN". 49 // Language code like "ko", "ja", "en-US", and "zh-CN".
52 std::string language_code_; 50 std::string language_code_;
53 // Options page URL e.g. 51 // Options page URL e.g.
54 // "chrome-extension://ceaajjmckiakobniehbjpdcidfpohlin/options.html". 52 // "chrome-extension://ceaajjmckiakobniehbjpdcidfpohlin/options.html".
55 // We can't use GURL here due to dependency policy. This field is valid only 53 // We can't use GURL here due to dependency policy. This field is valid only
56 // for input method extension. 54 // for input method extension.
57 std::string options_page_url_; 55 std::string options_page_url_;
58 // Indicates if this is a third party ime
59 bool third_party_;
60 }; 56 };
61 57
62 typedef std::vector<InputMethodDescriptor> InputMethodDescriptors; 58 typedef std::vector<InputMethodDescriptor> InputMethodDescriptors;
63 59
64 } // namespace input_method 60 } // namespace input_method
65 } // namespace chromeos 61 } // namespace chromeos
66 62
67 #endif // CHROMEOS_IME_INPUT_METHOD_DESCRIPTOR_H_ 63 #endif // CHROMEOS_IME_INPUT_METHOD_DESCRIPTOR_H_
OLDNEW
« no previous file with comments | « chromeos/ime/component_extension_ime_manager.cc ('k') | chromeos/ime/input_method_descriptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698