| OLD | NEW |
| 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 CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_API_PARSER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_API_PARSER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_API_PARSER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_API_PARSER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 static void RegisterJSONConverter( | 90 static void RegisterJSONConverter( |
| 91 base::JSONValueConverter<DriveAppIcon>* converter); | 91 base::JSONValueConverter<DriveAppIcon>* converter); |
| 92 | 92 |
| 93 // Creates drive app icon instance from parsed JSON. | 93 // Creates drive app icon instance from parsed JSON. |
| 94 static scoped_ptr<DriveAppIcon> CreateFrom(const base::Value& value); | 94 static scoped_ptr<DriveAppIcon> CreateFrom(const base::Value& value); |
| 95 | 95 |
| 96 // Category of the icon. | 96 // Category of the icon. |
| 97 IconCategory category() const { return category_; } | 97 IconCategory category() const { return category_; } |
| 98 | 98 |
| 99 // Size in pixels of one side of the icon (icons are always square). | 99 // Size in pixels of one side of the icon (icons are always square). |
| 100 const int icon_side_length() const { return icon_side_length_; } | 100 int icon_side_length() const { return icon_side_length_; } |
| 101 | 101 |
| 102 // Returns URL for this icon. | 102 // Returns URL for this icon. |
| 103 const GURL& icon_url() const { return icon_url_; } | 103 const GURL& icon_url() const { return icon_url_; } |
| 104 | 104 |
| 105 private: | 105 private: |
| 106 // Parses and initializes data members from content of |value|. | 106 // Parses and initializes data members from content of |value|. |
| 107 // Return false if parsing fails. | 107 // Return false if parsing fails. |
| 108 bool Parse(const base::Value& value); | 108 bool Parse(const base::Value& value); |
| 109 | 109 |
| 110 // Extracts the icon category from the given string. Returns false and does | 110 // Extracts the icon category from the given string. Returns false and does |
| (...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 583 GURL next_link_; | 583 GURL next_link_; |
| 584 int64 largest_change_id_; | 584 int64 largest_change_id_; |
| 585 ScopedVector<ChangeResource> items_; | 585 ScopedVector<ChangeResource> items_; |
| 586 | 586 |
| 587 DISALLOW_COPY_AND_ASSIGN(ChangeList); | 587 DISALLOW_COPY_AND_ASSIGN(ChangeList); |
| 588 }; | 588 }; |
| 589 | 589 |
| 590 } // namespace gdata | 590 } // namespace gdata |
| 591 | 591 |
| 592 #endif // CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_API_PARSER_H_ | 592 #endif // CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_API_PARSER_H_ |
| OLD | NEW |