-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
513 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// Copyright 2025 The Cobalt Authors | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "cobalt/common/shell_switches.h" | ||
|
||
#include "base/command_line.h" | ||
|
||
namespace switches { | ||
|
||
// Makes Content Shell use the given path for its data directory. | ||
// NOTE: If changing this value, change the corresponding Java-side value in | ||
// ContentShellBrowserTestActivity.java#getUserDataDirectoryCommandLineSwitch() | ||
// to match. | ||
const char kContentShellDataPath[] = "data-path"; | ||
|
||
// The directory breakpad should store minidumps in. | ||
const char kCrashDumpsDir[] = "crash-dumps-dir"; | ||
|
||
// Disables the check for the system font when specified. | ||
const char kDisableSystemFontCheck[] = "disable-system-font-check"; | ||
|
||
// Exposes the window.internals object to JavaScript for interactive development | ||
// and debugging of web tests that rely on it. | ||
const char kExposeInternalsForTesting[] = "expose-internals-for-testing"; | ||
|
||
// Size for the content_shell's host window (i.e. "800x600"). | ||
const char kContentShellHostWindowSize[] = "content-shell-host-window-size"; | ||
|
||
// Hides toolbar from content_shell's host window. | ||
const char kContentShellHideToolbar[] = "content-shell-hide-toolbar"; | ||
|
||
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS) | ||
// Let DevTools front-end talk to the target of type "tab" rather than | ||
// "frame" when inspecting a WebContents. | ||
const char kContentShellDevToolsTabTarget[] = | ||
"content-shell-devtools-tab-target"; | ||
#endif | ||
|
||
// Enables APIs guarded with the [IsolatedContext] IDL attribute for the given | ||
// comma-separated list of origins. | ||
const char kIsolatedContextOrigins[] = "isolated-context-origins"; | ||
|
||
// Use the given address instead of the default loopback for accepting remote | ||
// debugging connections. Note that the remote debugging protocol does not | ||
// perform any authentication, so exposing it too widely can be a security | ||
// risk. | ||
const char kRemoteDebuggingAddress[] = "remote-debugging-address"; | ||
|
||
// Runs Content Shell in web test mode, injecting test-only behaviour for | ||
// blink web tests. | ||
const char kRunWebTests[] = "run-web-tests"; | ||
|
||
bool IsRunWebTestsSwitchPresent() { | ||
return base::CommandLine::ForCurrentProcess()->HasSwitch( | ||
switches::kRunWebTests); | ||
} | ||
|
||
} // namespace switches |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright 2025 The Cobalt Authors | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
// Defines all the Cobalt command-line switches. | ||
|
||
#ifndef COBALT_COMMON_SHELL_SWITCHES_H_ | ||
#define COBALT_COMMON_SHELL_SWITCHES_H_ | ||
|
||
#include "build/build_config.h" | ||
|
||
namespace switches { | ||
|
||
extern const char kContentShellDataPath[]; | ||
extern const char kCrashDumpsDir[]; | ||
extern const char kDisableSystemFontCheck[]; | ||
extern const char kExposeInternalsForTesting[]; | ||
extern const char kContentShellHostWindowSize[]; | ||
extern const char kContentShellHideToolbar[]; | ||
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS) | ||
extern const char kContentShellDevToolsTabTarget[]; | ||
#endif | ||
extern const char kIsolatedContextOrigins[]; | ||
extern const char kRemoteDebuggingAddress[]; | ||
extern const char kRunWebTests[]; | ||
|
||
// Helper that returns true if kRunWebTests is present in the command line, | ||
// meaning Content Shell is running in web test mode. | ||
bool IsRunWebTestsSwitchPresent(); | ||
|
||
} // namespace switches | ||
|
||
#endif // COBALT_COMMON_SHELL_SWITCHES_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Copyright 2025 The Cobalt Authors. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
source_set("renderer") { | ||
sources = [ | ||
"cobalt_content_renderer_client.cc", | ||
"cobalt_content_renderer_client.h", | ||
] | ||
|
||
deps = [ | ||
"//components/cdm/renderer", | ||
"//components/network_hints/renderer", | ||
"//components/web_cache/renderer", | ||
"//content/public/common", | ||
"//content/public/renderer", | ||
"//content/test:content_test_mojo_bindings", | ||
"//media/mojo:buildflags", | ||
"//starboard:starboard_headers_only", | ||
"//v8", | ||
] | ||
} |
Oops, something went wrong.