<webview>: Define API endpoints for webview.contextMenus API.
[chromium-blink-merge.git] / tools / gn / input_file.cc
blob8e297984a07e2e24ca3e40a6f3b79cc21af4f12e
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
3 // found in the LICENSE file.
5 #include "tools/gn/input_file.h"
7 #include "base/file_util.h"
9 InputFile::InputFile(const SourceFile& name)
10 : name_(name),
11 dir_(name_.GetDir()),
12 contents_loaded_(false) {
15 InputFile::~InputFile() {
18 void InputFile::SetContents(const std::string& c) {
19 contents_loaded_ = true;
20 contents_ = c;
23 bool InputFile::Load(const base::FilePath& system_path) {
24 if (base::ReadFileToString(system_path, &contents_)) {
25 contents_loaded_ = true;
26 physical_name_ = system_path;
27 return true;
29 return false;