0

我正在为旧版 Google Chrome (71.0.3578.141) 开发新功能。

在文件 src/content/browser/devtools/protocol/page_handler.cc 中,我需要添加以下内容:

src/content/browser/devtools/protocol/page_handler.cc:

#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"

当我执行gn check out/Default时,输出为:

ERROR at //content/browser/devtools/protocol/page_handler.cc:8:11: Include not allowed.
#include "chrome/browser/ui/browser_list.h"
          ^-------------------------------
It is not in any dependency of
  //content/browser:browser
The include file is in the target(s):
  //chrome/browser/ui:ui
which should somehow be reachable.
___________________
ERROR at //content/browser/devtools/protocol/page_handler.cc:9:11: Include not allowed.
#include "chrome/browser/ui/browser.h"
          ^--------------------------
It is not in any dependency of
  //content/browser:browser
The include file is in the target(s):
  //chrome/browser/ui:ui
which should somehow be reachable.
___________________
ERROR at //content/browser/devtools/protocol/page_handler.cc:10:11: Include not allowed.
#include "chrome/browser/ui/browser_window.h"
          ^---------------------------------
It is not in any dependency of
  //content/browser:browser
The include file is in the target(s):
  //chrome/browser/ui:ui
which should somehow be reachable.

抱歉,我是新手,不知道 GN (Ninja) 工具是如何工作的。我认为我必须修改一些 BUILD.gn 文件(或任何其他 GN 配置文件),但我不知道从哪里开始。请问,谁能帮帮我?提前致谢!

4

0 回答 0