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

Side by Side Diff: chrome/common/extensions/extension.h

Issue 3207002: FBTF: Forward declare and move constructors in chrome/common/extensions/. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Win fixes Created 10 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
OLDNEW
1 // Copyright (c) 2010 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_COMMON_EXTENSIONS_EXTENSION_H_ 5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_H_
6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_H_ 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/file_path.h" 14 #include "base/file_path.h"
15 #include "base/gtest_prod_util.h" 15 #include "base/gtest_prod_util.h"
16 #include "base/scoped_ptr.h" 16 #include "base/scoped_ptr.h"
17 #include "base/values.h"
18 #include "chrome/common/extensions/extension_extent.h" 17 #include "chrome/common/extensions/extension_extent.h"
19 #include "chrome/common/extensions/user_script.h" 18 #include "chrome/common/extensions/user_script.h"
20 #include "chrome/common/extensions/url_pattern.h" 19 #include "chrome/common/extensions/url_pattern.h"
21 #include "gfx/size.h" 20 #include "gfx/size.h"
22 #include "googleurl/src/gurl.h" 21 #include "googleurl/src/gurl.h"
23 22
23 class DictionaryValue;
24 class ExtensionAction; 24 class ExtensionAction;
25 class ExtensionResource; 25 class ExtensionResource;
26 class SkBitmap; 26 class SkBitmap;
27 class Version; 27 class Version;
28 28
29 // Represents a Chrome extension. 29 // Represents a Chrome extension.
30 class Extension { 30 class Extension {
31 public: 31 public:
32 typedef std::vector<URLPattern> URLPatternList; 32 typedef std::vector<URLPattern> URLPatternList;
33 typedef std::map<const std::string, GURL> URLOverrideMap; 33 typedef std::map<const std::string, GURL> URLOverrideMap;
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 DISALLOW_COPY_AND_ASSIGN(Extension); 589 DISALLOW_COPY_AND_ASSIGN(Extension);
590 }; 590 };
591 591
592 typedef std::vector<Extension*> ExtensionList; 592 typedef std::vector<Extension*> ExtensionList;
593 593
594 // Handy struct to pass core extension info around. 594 // Handy struct to pass core extension info around.
595 struct ExtensionInfo { 595 struct ExtensionInfo {
596 ExtensionInfo(const DictionaryValue* manifest, 596 ExtensionInfo(const DictionaryValue* manifest,
597 const std::string& id, 597 const std::string& id,
598 const FilePath& path, 598 const FilePath& path,
599 Extension::Location location) 599 Extension::Location location);
600 : extension_id(id), 600 ~ExtensionInfo();
601 extension_path(path),
602 extension_location(location) {
603 if (manifest)
604 extension_manifest.reset(
605 static_cast<DictionaryValue*>(manifest->DeepCopy()));
606 }
607 601
608 scoped_ptr<DictionaryValue> extension_manifest; 602 scoped_ptr<DictionaryValue> extension_manifest;
609 std::string extension_id; 603 std::string extension_id;
610 FilePath extension_path; 604 FilePath extension_path;
611 Extension::Location extension_location; 605 Extension::Location extension_location;
612 606
613 private: 607 private:
614 DISALLOW_COPY_AND_ASSIGN(ExtensionInfo); 608 DISALLOW_COPY_AND_ASSIGN(ExtensionInfo);
615 }; 609 };
616 610
617 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ 611 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698