OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_ENCODING_MENU_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_ENCODING_MENU_CONTROLLER_H_ |
6 #define CHROME_BROWSER_ENCODING_MENU_CONTROLLER_H_ | 6 #define CHROME_BROWSER_ENCODING_MENU_CONTROLLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/basictypes.h" // For DISALLOW_COPY_AND_ASSIGN | 13 #include "base/basictypes.h" // For DISALLOW_COPY_AND_ASSIGN |
14 #include "base/gtest_prod_util.h" | 14 #include "base/gtest_prod_util.h" |
15 #include "base/string16.h" | 15 #include "base/string16.h" |
16 | 16 |
17 class Browser; | |
18 class Profile; | 17 class Profile; |
19 | 18 |
20 // Cross-platform logic needed for the encoding menu. | 19 // Cross-platform logic needed for the encoding menu. |
21 // For now, we don't need to track state so all methods are static. | 20 // For now, we don't need to track state so all methods are static. |
22 class EncodingMenuController { | 21 class EncodingMenuController { |
23 FRIEND_TEST_ALL_PREFIXES(EncodingMenuControllerTest, EncodingIDsBelongTest); | 22 FRIEND_TEST_ALL_PREFIXES(EncodingMenuControllerTest, EncodingIDsBelongTest); |
24 FRIEND_TEST_ALL_PREFIXES(EncodingMenuControllerTest, IsItemChecked); | 23 FRIEND_TEST_ALL_PREFIXES(EncodingMenuControllerTest, IsItemChecked); |
25 | 24 |
26 public: | 25 public: |
27 typedef std::pair<int, string16> EncodingMenuItem; | 26 typedef std::pair<int, string16> EncodingMenuItem; |
(...skipping 20 matching lines...) Expand all Loading... |
48 private: | 47 private: |
49 // List of all valid encoding GUI IDs. | 48 // List of all valid encoding GUI IDs. |
50 static const int kValidEncodingIds[]; | 49 static const int kValidEncodingIds[]; |
51 const int* ValidGUIEncodingIDs(); | 50 const int* ValidGUIEncodingIDs(); |
52 int NumValidGUIEncodingIDs(); | 51 int NumValidGUIEncodingIDs(); |
53 | 52 |
54 DISALLOW_COPY_AND_ASSIGN(EncodingMenuController); | 53 DISALLOW_COPY_AND_ASSIGN(EncodingMenuController); |
55 }; | 54 }; |
56 | 55 |
57 #endif // CHROME_BROWSER_ENCODING_MENU_CONTROLLER_H_ | 56 #endif // CHROME_BROWSER_ENCODING_MENU_CONTROLLER_H_ |
OLD | NEW |