From 16b3817b826f786013dfefcbb229c7ee701d4c15 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Fri, 30 Jan 2015 19:34:58 +0000 Subject: [PATCH] cefclient: Mac: Reduce helper process file dependencies (issue #1500) git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@2010 5089003a-bbd8-11dd-ad1f-f1f9622dbc98 --- cef_paths2.gypi | 22 ++-------------------- tests/cefclient/scheme_test.cc | 5 ----- tests/cefclient/scheme_test.h | 2 +- tests/cefclient/scheme_test_common.cc | 18 ++++++++++++++++++ 4 files changed, 21 insertions(+), 26 deletions(-) create mode 100644 tests/cefclient/scheme_test_common.cc diff --git a/cef_paths2.gypi b/cef_paths2.gypi index 17c64a901..7f34a6c7a 100644 --- a/cef_paths2.gypi +++ b/cef_paths2.gypi @@ -191,6 +191,7 @@ 'tests/cefclient/root_window_manager.h', 'tests/cefclient/scheme_test.cc', 'tests/cefclient/scheme_test.h', + 'tests/cefclient/scheme_test_common.cc', 'tests/cefclient/temp_window.h', 'tests/cefclient/test_runner.cc', 'tests/cefclient/test_runner.h', @@ -241,38 +242,19 @@ 'tests/cefclient/window_test_mac.mm', ], 'cefclient_sources_mac_helper': [ - 'tests/cefclient/binding_test.cc', - 'tests/cefclient/binding_test.h', 'tests/cefclient/client_app.cc', 'tests/cefclient/client_app.h', 'tests/cefclient/client_app_delegates.cc', - 'tests/cefclient/client_handler.cc', - 'tests/cefclient/client_handler.h', 'tests/cefclient/client_renderer.cc', 'tests/cefclient/client_renderer.h', 'tests/cefclient/client_switches.cc', 'tests/cefclient/client_switches.h', - 'tests/cefclient/dialog_test.cc', - 'tests/cefclient/dialog_test.h', - 'tests/cefclient/main_context.cc', - 'tests/cefclient/main_context.h', - 'tests/cefclient/main_message_loop.cc', - 'tests/cefclient/main_message_loop.h', 'tests/cefclient/performance_test.cc', 'tests/cefclient/performance_test.h', 'tests/cefclient/performance_test_setup.h', 'tests/cefclient/performance_test_tests.cc', 'tests/cefclient/process_helper_mac.cc', - 'tests/cefclient/resource_util.h', - 'tests/cefclient/resource_util_mac.mm', - 'tests/cefclient/resource_util_posix.cc', - 'tests/cefclient/scheme_test.cc', - 'tests/cefclient/scheme_test.h', - 'tests/cefclient/test_runner.cc', - 'tests/cefclient/test_runner.h', - 'tests/cefclient/window_test.cc', - 'tests/cefclient/window_test.h', - 'tests/cefclient/window_test_mac.mm', + 'tests/cefclient/scheme_test_common.cc', ], 'cefclient_bundle_resources_mac': [ 'tests/cefclient/mac/cefclient.icns', diff --git a/tests/cefclient/scheme_test.cc b/tests/cefclient/scheme_test.cc index 3460c4b5b..544ca58bc 100644 --- a/tests/cefclient/scheme_test.cc +++ b/tests/cefclient/scheme_test.cc @@ -147,11 +147,6 @@ class ClientSchemeHandlerFactory : public CefSchemeHandlerFactory { } // namespace -void RegisterCustomSchemes(CefRefPtr registrar, - std::vector& cookiable_schemes) { - registrar->AddCustomScheme("client", true, false, false); -} - void RegisterSchemeHandlers() { CefRegisterSchemeHandlerFactory("client", "tests", new ClientSchemeHandlerFactory()); diff --git a/tests/cefclient/scheme_test.h b/tests/cefclient/scheme_test.h index 157e27bfc..ca14fa5c1 100644 --- a/tests/cefclient/scheme_test.h +++ b/tests/cefclient/scheme_test.h @@ -19,7 +19,7 @@ namespace scheme_test { void RegisterCustomSchemes(CefRefPtr registrar, std::vector& cookiable_schemes); -// Create the scheme handler. +// Create the scheme handler. Called from both the browser and renderer process. void RegisterSchemeHandlers(); } // namespace scheme_test diff --git a/tests/cefclient/scheme_test_common.cc b/tests/cefclient/scheme_test_common.cc new file mode 100644 index 000000000..496e44e1c --- /dev/null +++ b/tests/cefclient/scheme_test_common.cc @@ -0,0 +1,18 @@ +// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that +// can be found in the LICENSE file. + +#include "cefclient/scheme_test.h" + +#include "include/cef_scheme.h" + +namespace client { +namespace scheme_test { + +void RegisterCustomSchemes(CefRefPtr registrar, + std::vector& cookiable_schemes) { + registrar->AddCustomScheme("client", true, false, false); +} + +} // namespace scheme_test +} // namespace client