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

Side by Side Diff: tools/gn/scope_per_file_provider.h

Issue 643063004: Convert OVERRIDE -> override and update virtual/final usage in tools/gn/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 6 years, 1 month 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 | « tools/gn/parse_tree.h ('k') | tools/gn/setup.h » ('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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 TOOLS_GN_SCOPE_PER_FILE_PROVIDER_H_ 5 #ifndef TOOLS_GN_SCOPE_PER_FILE_PROVIDER_H_
6 #define TOOLS_GN_SCOPE_PER_FILE_PROVIDER_H_ 6 #define TOOLS_GN_SCOPE_PER_FILE_PROVIDER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "tools/gn/scope.h" 10 #include "tools/gn/scope.h"
11 #include "tools/gn/source_file.h" 11 #include "tools/gn/source_file.h"
12 12
13 // ProgrammaticProvider for a scope to provide it with per-file built-in 13 // ProgrammaticProvider for a scope to provide it with per-file built-in
14 // variable support. 14 // variable support.
15 class ScopePerFileProvider : public Scope::ProgrammaticProvider { 15 class ScopePerFileProvider : public Scope::ProgrammaticProvider {
16 public: 16 public:
17 // allow_target_vars allows the target-related variables to get resolved. 17 // allow_target_vars allows the target-related variables to get resolved.
18 // When allow_target_vars is unset, the target-related values will be 18 // When allow_target_vars is unset, the target-related values will be
19 // undefined to GN script. 19 // undefined to GN script.
20 ScopePerFileProvider(Scope* scope, bool allow_target_vars); 20 ScopePerFileProvider(Scope* scope, bool allow_target_vars);
21 virtual ~ScopePerFileProvider(); 21 virtual ~ScopePerFileProvider();
22 22
23 // ProgrammaticProvider implementation. 23 // ProgrammaticProvider implementation.
24 virtual const Value* GetProgrammaticValue( 24 const Value* GetProgrammaticValue(const base::StringPiece& ident) override;
25 const base::StringPiece& ident) override;
26 25
27 private: 26 private:
28 const Value* GetCurrentToolchain(); 27 const Value* GetCurrentToolchain();
29 const Value* GetDefaultToolchain(); 28 const Value* GetDefaultToolchain();
30 const Value* GetPythonPath(); 29 const Value* GetPythonPath();
31 const Value* GetRootBuildDir(); 30 const Value* GetRootBuildDir();
32 const Value* GetRootGenDir(); 31 const Value* GetRootGenDir();
33 const Value* GetRootOutDir(); 32 const Value* GetRootOutDir();
34 const Value* GetTargetGenDir(); 33 const Value* GetTargetGenDir();
35 const Value* GetTargetOutDir(); 34 const Value* GetTargetOutDir();
36 35
37 bool allow_target_vars_; 36 bool allow_target_vars_;
38 37
39 // All values are lazily created. 38 // All values are lazily created.
40 scoped_ptr<Value> current_toolchain_; 39 scoped_ptr<Value> current_toolchain_;
41 scoped_ptr<Value> default_toolchain_; 40 scoped_ptr<Value> default_toolchain_;
42 scoped_ptr<Value> python_path_; 41 scoped_ptr<Value> python_path_;
43 scoped_ptr<Value> root_build_dir_; 42 scoped_ptr<Value> root_build_dir_;
44 scoped_ptr<Value> root_gen_dir_; 43 scoped_ptr<Value> root_gen_dir_;
45 scoped_ptr<Value> root_out_dir_; 44 scoped_ptr<Value> root_out_dir_;
46 scoped_ptr<Value> target_gen_dir_; 45 scoped_ptr<Value> target_gen_dir_;
47 scoped_ptr<Value> target_out_dir_; 46 scoped_ptr<Value> target_out_dir_;
48 47
49 DISALLOW_COPY_AND_ASSIGN(ScopePerFileProvider); 48 DISALLOW_COPY_AND_ASSIGN(ScopePerFileProvider);
50 }; 49 };
51 50
52 #endif // TOOLS_GN_SCOPE_PER_FILE_PROVIDER_H_ 51 #endif // TOOLS_GN_SCOPE_PER_FILE_PROVIDER_H_
OLDNEW
« no previous file with comments | « tools/gn/parse_tree.h ('k') | tools/gn/setup.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698