Skip to content
This repository has been archived by the owner on Jan 4, 2019. It is now read-only.

Commit

Permalink
fix internal deps and patch with https://chromium.googlesource.com/ch…
Browse files Browse the repository at this point in the history
  • Loading branch information
bridiver committed May 26, 2017
1 parent 9a59bc9 commit cee612c
Show file tree
Hide file tree
Showing 11 changed files with 122 additions and 89 deletions.
6 changes: 4 additions & 2 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,10 @@ source_set("utility") {
"build:electron_config",
]

public_deps = [
"//content/public/common",
]

deps = [
"chromium_src:importer",
"//chrome/common",
Expand Down Expand Up @@ -271,8 +275,6 @@ source_set("renderer") {
include_dirs = [
# force this to appear before the chromium root src dir
"chromium_src",
# needed because TextCheckerClient.h uses paths rooted here
"//third_party/WebKit/Source"
]

sources = [
Expand Down
4 changes: 0 additions & 4 deletions DEPS
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
include_rules = [
"+third_party/boringssl/src/include",
]

use_relative_paths = True

deps = {
Expand Down
2 changes: 1 addition & 1 deletion atom/app/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ source_set("app") {

deps = [
"//content/public/common:interfaces",
"//content/public/common",
"//components/rappor/public/interfaces",
"//third_party/widevine/cdm:headers",
"//third_party/WebKit/public:mojo_bindings",
]

if (is_win) {
Expand Down
3 changes: 2 additions & 1 deletion atom/browser/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ source_set("browser") {
]

public_deps = [
"//content/public/browser",
"//content/public/common",
"//electron/vendor/brightray:browser",
"//ui/events",
"//components/security_state/content",
Expand Down Expand Up @@ -342,7 +344,6 @@ source_set("importer") {
include_dirs = [
# make sure chromium_src comes before the chrome src root
"//electron/chromium_src",
"//third_party/boringssl/src/include",
]

sources = [
Expand Down
4 changes: 3 additions & 1 deletion atom/common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ source_set("node") {
]

deps = [
"//content/public/common",
"//media:media_features",
"//third_party/WebKit/public:blink_headers",
"//third_party/WebKit/public:mojo_bindings",
"//electron/brave/common/converters",
]
}
Expand Down Expand Up @@ -117,8 +117,10 @@ source_set("common") {

public_deps = [
":node",
"//content/public/common",
"//chrome/common",
"//components/autofill/core/common",
"//ipc",
]

deps = [
Expand Down
37 changes: 20 additions & 17 deletions atom/renderer/api/atom_api_spell_check_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,30 +51,33 @@ SpellCheckClient::SpellCheckClient(const std::string& language,

SpellCheckClient::~SpellCheckClient() {}

void SpellCheckClient::CheckSpellingOfString(
const String& text,
int* misspelling_start,
int* misspelling_len) {
Vector<blink::TextCheckingResult> results;
SpellCheckText(text.Characters16(), true, &results);
void SpellCheckClient::CheckSpelling(
const blink::WebString& text,
int& misspelling_start,
int& misspelling_len,
blink::WebVector<blink::WebString>* optional_suggestions) {
std::vector<blink::WebTextCheckingResult> results;
SpellCheckText(text.Utf16(), true, &results);
if (results.size() == 1) {
*misspelling_start = results[0].location;
*misspelling_len = results[0].length;
misspelling_start = results[0].location;
misspelling_len = results[0].length;
}
}

void SpellCheckClient::RequestCheckingOfString(
blink::TextCheckingRequest* request) {
const String& wtfText = request->Data().GetText();
base::string16 text = wtfText.Characters16();
void SpellCheckClient::RequestCheckingOfText(
const blink::WebString& wtfText,
blink::WebTextCheckingCompletion* completion) {
base::string16 text = wtfText.Utf16();
if (text.empty() || !HasWordCharacters(text, 0)) {
request->DidCancel();
if (completion) {
completion->DidCancelCheckingText();
}
return;
}

Vector<blink::TextCheckingResult> results;
std::vector<blink::WebTextCheckingResult> results;
SpellCheckText(text, false, &results);
request->DidSucceed(results);
completion->DidFinishCheckingText(results);
}

void SpellCheckClient::ShowSpellingUI(bool show) {
Expand All @@ -91,7 +94,7 @@ void SpellCheckClient::UpdateSpellingUIWithMisspelledWord(
void SpellCheckClient::SpellCheckText(
const base::string16& text,
bool stop_at_first_result,
Vector<blink::TextCheckingResult>* results) {
std::vector<blink::WebTextCheckingResult>* results) {
if (text.length() == 0 || spell_check_.IsEmpty())
return;

Expand Down Expand Up @@ -126,7 +129,7 @@ void SpellCheckClient::SpellCheckText(
if (IsValidContraction(word))
continue;

blink::TextCheckingResult result;
blink::WebTextCheckingResult result;
result.location = word_start;
result.length = word_length;
results->push_back(result);
Expand Down
24 changes: 14 additions & 10 deletions atom/renderer/api/atom_api_spell_check_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
#include "components/spellcheck/renderer/spellcheck.h"
#include "components/spellcheck/renderer/spellcheck_worditerator.h"
#include "native_mate/scoped_persistent.h"
#include "third_party/WebKit/Source/platform/text/TextCheckerClient.h"
#include "third_party/WebKit/public/web/WebSpellCheckClient.h"
#include "third_party/WebKit/public/web/WebTextCheckClient.h"

namespace atom {

namespace api {

class SpellCheckClient : public blink::WebSpellCheckClient,
public blink::TextCheckerClient {
blink::WebTextCheckClient {
public:
SpellCheckClient(const std::string& language,
bool auto_spell_correct_turned_on,
Expand All @@ -30,22 +30,26 @@ class SpellCheckClient : public blink::WebSpellCheckClient,

private:
// blink::WebSpellCheckClient:
void CheckSpellingOfString(
const String& text,
int* misspelled_offset,
int* misspelled_length) override;
void RequestCheckingOfString(
blink::TextCheckingRequest* request) override;
void CheckSpelling(
const blink::WebString& text,
int& offset,
int& length,
blink::WebVector<blink::WebString>* optional_suggestions) override;
void RequestCheckingOfText(
const blink::WebString& text,
blink::WebTextCheckingCompletion* completion) override;
void CancelAllPendingRequests() override {};


void ShowSpellingUI(bool show) override;
bool IsShowingSpellingUI() override;
void UpdateSpellingUIWithMisspelledWord(
const blink::WebString& word) override;
void CancelAllPendingRequests() { }

// Check the spelling of text.
void SpellCheckText(const base::string16& text,
bool stop_at_first_result,
Vector<blink::TextCheckingResult>* results);
std::vector<blink::WebTextCheckingResult>* results);

// Call JavaScript to check spelling a word.
bool SpellCheckWord(const base::string16& word_to_check);
Expand Down
1 change: 1 addition & 0 deletions brave/common/extensions/api/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ json_schema_api("api_registration") {

deps = [
":api",
"//extensions/common",
]

deps += schema_dependencies
Expand Down
13 changes: 11 additions & 2 deletions chromium_src/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ config("chromium_src_config") {
"$root_gen_dir/chrome",
"$root_gen_dir/components/strings",
"//skia/config",
"//third_party/boringssl/src/include",
"//third_party/skia/include/core",
]

Expand Down Expand Up @@ -97,6 +96,7 @@ source_set("renderer") {
}

deps = [
"//content/public/common",
"//chrome/renderer",
"//components/content_settings/core/common",
"//third_party/WebKit/public:blink_headers",
Expand Down Expand Up @@ -518,6 +518,7 @@ source_set("search_engines") {
]

deps = [
":sessions",
"//components/keyed_service/content",
"//components/search_engines",
"//components/omnibox/browser",
Expand Down Expand Up @@ -550,6 +551,7 @@ source_set("web_data") {
]

deps = [
":sessions",
"//components/keyed_service/content",
"//components/webdata_services",
":sync",
Expand Down Expand Up @@ -620,6 +622,8 @@ source_set("favicon") {
]

deps = [
"//content/public/browser",
"//content/public/common",
"//components/favicon/content",
"//components/favicon/core",
"//components/favicon_base",
Expand Down Expand Up @@ -733,8 +737,13 @@ source_set("sessions") {
"//chrome/browser/profiles/sql_init_error_message_ids.h",
]

deps = [
public_deps = [
"//content/public/browser",
"//content/public/common",
"//net",
]

deps = [
"//third_party/icu",
"//third_party/protobuf:protobuf_lite",
]
Expand Down
103 changes: 55 additions & 48 deletions patches/master_patch.patch
Original file line number Diff line number Diff line change
Expand Up @@ -1802,6 +1802,29 @@ index 1d35db54bdeae44770d385f3a3e92e9ce1e64393..8d9b99080ce8234c0bd21ce3b4e4f3c5
#else
is_elastic_overscroll_enabled_ = false;
#endif
diff --git a/extensions/browser/api/BUILD.gn b/extensions/browser/api/BUILD.gn
index dcf2bdb8fe74c816c8e8e3cebfb90c819c72c6c2..edc42708dfffc89da64ca24496d7085d5a93edd0 100644
--- a/extensions/browser/api/BUILD.gn
+++ b/extensions/browser/api/BUILD.gn
@@ -25,6 +25,9 @@ source_set("api") {
]

public_deps = [
+ "//base",
+ "//content/public/browser",
+ "//content/public/common",
"//extensions/browser/api/activity_log",
"//extensions/browser/api/alarms",
"//extensions/browser/api/app_current_window_internal",
@@ -73,6 +76,8 @@ source_set("api") {
"//extensions/browser/api/usb",
"//extensions/browser/api/virtual_keyboard_private",
"//extensions/browser/api/web_request",
+ "//extensions/common",
+ "//ipc",
]

deps = [
diff --git a/extensions/browser/guest_view/extensions_guest_view_manager_delegate.cc b/extensions/browser/guest_view/extensions_guest_view_manager_delegate.cc
index 061480b5acd6431aa9abb7e02c98ebe5e881d7f9..f8288fa42f148651fd729dbce111c6c4151fe2b0 100644
--- a/extensions/browser/guest_view/extensions_guest_view_manager_delegate.cc
Expand All @@ -1817,21 +1840,26 @@ index 061480b5acd6431aa9abb7e02c98ebe5e881d7f9..f8288fa42f148651fd729dbce111c6c4

content::WebContents* owner = guest->owner_web_contents();
if (!owner)
diff --git a/extensions/browser/updater/BUILD.gn b/extensions/browser/updater/BUILD.gn
index df80e64d6a71968ca0c984eacace8f6dba14a606..f785b386a443cc3e316c8ffde8a643695a61f34d 100644
--- a/extensions/browser/updater/BUILD.gn
+++ b/extensions/browser/updater/BUILD.gn
@@ -3,6 +3,10 @@
# found in the LICENSE file.

source_set("updater") {
+ include_dirs = [
+ "//third_party/boringssl/src/include",
+ ]
+
sources = [
"extension_cache.h",
"extension_downloader.cc",
diff --git a/extensions/common/BUILD.gn b/extensions/common/BUILD.gn
index 8af643d9d4269fc523c89e983a9cb9b9800ed1cd..189cf47e7756d8917e87ac6ec46c81a8b1d08b2e 100644
--- a/extensions/common/BUILD.gn
+++ b/extensions/common/BUILD.gn
@@ -271,6 +271,7 @@ if (enable_extensions) {
public_deps = [
":common_constants",
":mojo",
+ "//content/public/common",
"//ipc",
"//skia",
]
@@ -284,7 +285,6 @@ if (enable_extensions) {
"//chrome:resources",
"//components/crx_file",
"//components/url_matcher",
- "//content/public/common",
"//crypto",
"//device/bluetooth",
"//device/usb",
diff --git a/extensions/common/api/_api_features.json b/extensions/common/api/_api_features.json
index 3c12e67ab157eedaf21228288fdad29b23c01cf5..eff910f3b2109c2f427c85a59d60139c106d780c 100644
--- a/extensions/common/api/_api_features.json
Expand Down Expand Up @@ -1878,6 +1906,18 @@ index 3c12e67ab157eedaf21228288fdad29b23c01cf5..eff910f3b2109c2f427c85a59d60139c
"chrome://chrome-signin/*",
"chrome://media-router/*",
"chrome://oobe/*"
diff --git a/extensions/renderer/BUILD.gn b/extensions/renderer/BUILD.gn
index fca1114a561be434deb0f0915ed36b3a669b23e9..b049678396ee14eef203ccbc42c71ee6adfc690e 100644
--- a/extensions/renderer/BUILD.gn
+++ b/extensions/renderer/BUILD.gn
@@ -245,6 +245,7 @@ source_set("renderer") {
"//components/guest_view/renderer",
"//content:resources",
"//extensions:extensions_resources",
+ "//extensions/common",
"//extensions/common/api",
"//gin",
"//mojo/edk/js",
diff --git a/extensions/renderer/resources/guest_view/guest_view_container.js b/extensions/renderer/resources/guest_view/guest_view_container.js
index 2ef77f4f6359618be7b37d0804a77dd4883dbc06..47f9059b1819810fc4284a9d63aae1d8c658431f 100644
--- a/extensions/renderer/resources/guest_view/guest_view_container.js
Expand Down Expand Up @@ -1997,23 +2037,6 @@ index 2fc0977882d944317b26a89c095cde076383e308..223eab775d985f06d1775e5141bd4aae
if (!locked_pending_user_gesture_)
return false;

diff --git a/third_party/WebKit/public/BUILD.gn b/third_party/WebKit/public/BUILD.gn
index d54758bc3e2cda04fda14b23558709c68c20e43a..605d552375464c26a77450e846eef69545463689 100644
--- a/third_party/WebKit/public/BUILD.gn
+++ b/third_party/WebKit/public/BUILD.gn
@@ -691,7 +691,11 @@ grit("image_resources") {
}

mojom("mojo_bindings") {
- visibility = [ "//content/*" ]
+ visibility = [
+ "//content/*",
+ "//electron/atom/common/*",
+ "//electron/atom/app/*",
+ ]
visibility_blink = [
"//content/common:mojo_bindings_blink",
"//third_party/WebKit/Source/platform",
diff --git a/third_party/boringssl/BUILD.generated.gni b/third_party/boringssl/BUILD.generated.gni
index d3653663265500b0fe1611d00984222d0d9cec86..ed538427b959ee12b5f77dd37e114c330dd5bc0a 100644
--- a/third_party/boringssl/BUILD.generated.gni
Expand Down Expand Up @@ -2074,19 +2097,3 @@ index b66c652c0aebd8be609ce55e4964f50175098437..48a545ebf11e08ae2344e4ec6a0a7c1a
]
#TODO(jrummell) Mac: 'DYLIB_INSTALL_NAME_BASE': '@loader_path',
} else if (is_posix && !is_mac) {
diff --git a/tools/json_schema_compiler/json_schema_api.gni b/tools/json_schema_compiler/json_schema_api.gni
index 46cb996f1bcb96cbfd2c12eda19cb2447c247eab..aa50a9540fe9a84e63bc32cb1bfcd964fb198381 100644
--- a/tools/json_schema_compiler/json_schema_api.gni
+++ b/tools/json_schema_compiler/json_schema_api.gni
@@ -86,7 +86,10 @@ template("json_schema_api") {

generated_config_name = target_name + "_generated_config"
config(generated_config_name) {
- include_dirs = [ root_gen_dir ]
+ include_dirs = [
+ root_gen_dir,
+ "//third_party/boringssl/src/include",
+ ]
visibility = target_visibility
}

Loading

1 comment on commit cee612c

@darkdh
Copy link
Member

@darkdh darkdh commented on cee612c May 31, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++

Please sign in to comment.