Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use chromium's side panel inside our side bar container, and insert Reading List #13769

Merged
merged 3 commits into from
Aug 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion app/brave_main_delegate_browsertest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ IN_PROC_BROWSER_TEST_F(BraveMainDelegateBrowserTest, DisabledFeatures) {
&permissions::features::kPermissionOnDeviceNotificationPredictions,
&privacy_sandbox::kOverridePrivacySandboxSettingsLocalTesting,
&privacy_sandbox::kPrivacySandboxSettings3,
&reading_list::switches::kReadLater,
&shared_highlighting::kSharedHighlightingAmp,
#if !BUILDFLAG(IS_ANDROID)
&translate::kTFLiteLanguageDetectionEnabled,
Expand Down
1 change: 1 addition & 0 deletions app/theme/brave_theme_resources.grd
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@

<if expr="enable_sidebar">
<structure type="chrome_scaled_image" name="IDR_SIDEBAR_BOOKMARKS_FOCUSED" file="brave/sidebar_bookmark_focused.png" />
<structure type="chrome_scaled_image" name="IDR_SIDEBAR_READING_LIST_FOCUSED" file="brave/sidebar_reading_list_focused.png" />
<structure type="chrome_scaled_image" name="IDR_SIDEBAR_BRAVE_TALK_FOCUSED" file="brave/sidebar_brave_talk_focused.png" />
<structure type="chrome_scaled_image" name="IDR_SIDEBAR_CRYPTO_WALLET_FOCUSED" file="brave/sidebar_crypto_wallet_focused.png" />
<structure type="chrome_scaled_image" name="IDR_SIDEBAR_HISTORY_FOCUSED" file="brave/sidebar_history_focused.png" />
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/vector_icons/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ aggregate_vector_icons("brave_vector_icons") {
"sidebar_item_added_check.icon",
"sidebar_items_down_arrow.icon",
"sidebar_items_up_arrow.icon",
"sidebar_reading_list.icon",
"sidebar_settings.icon",
"sidebar_trash.icon",
]
Expand Down
77 changes: 77 additions & 0 deletions app/vector_icons/sidebar_reading_list.icon
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
CANVAS_DIMENSIONS, 16,
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we have copyright here?

MOVE_TO, 15.33f, 14,
H_LINE_TO, 10,
R_CUBIC_TO, -0.74f, 0, -1.34f, 0.6f, -1.34f, 1.33f,
R_ARC_TO, 0.67f, 0.67f, 0, 1, 1, -1.33f, 0,
CUBIC_TO, 7.33f, 14.6f, 6.73f, 14, 5.99f, 14,
H_LINE_TO, 0.67f,
ARC_TO, 0.67f, 0.67f, 0, 0, 1, 0, 13.33f,
V_LINE_TO, 0.67f,
CUBIC_TO, 0, 0.3f, 0.3f, 0, 0.67f, 0,
H_LINE_TO, 6.04f,
R_CUBIC_TO, 0.78f, 0, 1.48f, 0.35f, 1.96f, 0.89f,
ARC_TO, 2.61f, 2.61f, 0, 0, 1, 9.95f, 0,
R_LINE_TO, 0.01f, 0,
R_LINE_TO, 0.01f, 0,
R_H_LINE_TO, 5.36f,
R_CUBIC_TO, 0.37f, 0, 0.67f, 0.3f, 0.67f, 0.67f,
R_V_LINE_TO, 12.67f,
R_ARC_TO, 0.67f, 0.67f, 0, 0, 1, -0.67f, 0.67f,
CLOSE,
MOVE_TO, 7.33f, 2.62f,
R_ARC_TO, 1.29f, 1.29f, 0, 0, 0, -1.29f, -1.29f,
H_LINE_TO, 1.34f,
R_V_LINE_TO, 11.33f,
H_LINE_TO, 6.03f,
R_CUBIC_TO, 0.01f, 0, 0.02f, 0.01f, 0.04f, 0.01f,
R_CUBIC_TO, 0.46f, 0.01f, 0.89f, 0.14f, 1.26f, 0.36f,
V_LINE_TO, 2.62f,
CLOSE,
R_MOVE_TO, 7.34f, -1.29f,
H_LINE_TO, 9.97f,
R_LINE_TO, -0.01f, 0,
R_LINE_TO, -0.01f, 0,
R_ARC_TO, 1.29f, 1.29f, 0, 0, 0, -1.29f, 1.29f,
R_V_LINE_TO, 10.42f,
R_ARC_TO, 2.64f, 2.64f, 0, 0, 1, 1.28f, -0.37f,
R_CUBIC_TO, 0.01f, 0, 0.02f, 0, 0.03f, 0,
R_H_LINE_TO, 4.7f,
V_LINE_TO, 1.33f,
CLOSE,
R_MOVE_TO, -5.34f, 8,
R_CUBIC_TO, 0, -0.37f, 0.3f, -0.67f, 0.67f, -0.67f,
R_H_LINE_TO, 3.34f,
R_ARC_TO, 0.67f, 0.67f, 0, 1, 1, 0, 1.33f,
H_LINE_TO, 10,
R_ARC_TO, 0.67f, 0.67f, 0, 0, 1, -0.67f, -0.67f,
CLOSE,
R_MOVE_TO, 4, -2,
H_LINE_TO, 10,
R_ARC_TO, 0.67f, 0.67f, 0, 1, 1, 0, -1.33f,
R_H_LINE_TO, 3.34f,
R_ARC_TO, 0.67f, 0.67f, 0, 1, 1, 0, 1.33f,
CLOSE,
R_MOVE_TO, 0, -2.67f,
H_LINE_TO, 10,
R_ARC_TO, 0.67f, 0.67f, 0, 1, 1, 0, -1.33f,
R_H_LINE_TO, 3.34f,
R_ARC_TO, 0.67f, 0.67f, 0, 1, 1, 0, 1.33f,
CLOSE,
MOVE_TO, 2.66f, 10,
R_ARC_TO, 0.67f, 0.67f, 0, 1, 1, 0, -1.33f,
R_H_LINE_TO, 3.34f,
R_ARC_TO, 0.67f, 0.67f, 0, 1, 1, 0, 1.33f,
H_LINE_TO, 2.66f,
CLOSE,
R_MOVE_TO, 3.34f, -2.67f,
H_LINE_TO, 2.66f,
ARC_TO, 0.67f, 0.67f, 0, 1, 1, 2.66f, 6,
R_H_LINE_TO, 3.34f,
R_ARC_TO, 0.67f, 0.67f, 0, 1, 1, 0, 1.33f,
CLOSE,
R_MOVE_TO, 0, -2.67f,
H_LINE_TO, 2.66f,
R_ARC_TO, 0.67f, 0.67f, 0, 1, 1, 0, -1.33f,
R_H_LINE_TO, 3.34f,
R_ARC_TO, 0.67f, 0.67f, 0, 1, 1, 0, 1.33f,
CLOSE
8 changes: 0 additions & 8 deletions brave_paks.gni
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# You can obtain one at http://mozilla.org/MPL/2.0/.

import("//brave/components/brave_webtorrent/browser/buildflags/buildflags.gni")
import("//brave/components/sidebar/buildflags/buildflags.gni")
import("//brave/components/tor/buildflags/buildflags.gni")
import("//build/config/locales.gni")
import("//chrome/common/features.gni")
Expand Down Expand Up @@ -90,13 +89,6 @@ template("brave_extra_paks") {
]
}

if (enable_sidebar) {
sources += [
"$root_gen_dir/brave/browser/resources/sidebar/sidebar_resources.pak",
]
deps += [ "//brave/browser/resources/sidebar:resources" ]
}

if (enable_tor) {
sources +=
[ "$root_gen_dir/brave/components/tor/resources/tor_resources.pak" ]
Expand Down
10 changes: 0 additions & 10 deletions browser/brave_content_browser_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,6 @@ using extensions::ChromeContentBrowserClientExtensionsPart;
#include "brave/browser/ethereum_remote_client/ethereum_remote_client_service_factory.h"
#endif

#if BUILDFLAG(ENABLE_SIDEBAR)
#include "brave/browser/ui/webui/sidebar/sidebar.mojom.h"
#include "brave/browser/ui/webui/sidebar/sidebar_bookmarks_ui.h"
#endif

#if !BUILDFLAG(IS_ANDROID)
#include "brave/browser/new_tab/new_tab_shows_navigation_throttle.h"
#include "brave/browser/ui/webui/brave_federated/federated_internals.mojom.h"
Expand Down Expand Up @@ -594,11 +589,6 @@ void BraveContentBrowserClient::RegisterBrowserInterfaceBindersForFrame(
}
#endif

#if BUILDFLAG(ENABLE_SIDEBAR)
chrome::internal::RegisterWebUIControllerInterfaceBinder<
sidebar::mojom::BookmarksPageHandlerFactory, SidebarBookmarksUI>(map);
#endif

// Brave News
#if !BUILDFLAG(IS_ANDROID)
if (base::FeatureList::IsEnabled(brave_today::features::kBraveNewsFeature)) {
Expand Down
4 changes: 2 additions & 2 deletions browser/net/brave_network_audit_browsertest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,9 @@ IN_PROC_BROWSER_TEST_F(BraveNetworkAuditTest, BasicTests) {
auto* sidebar_controller =
static_cast<BraveBrowser*>(browser())->sidebar_controller();
auto* sidebar_model = sidebar_controller->model();
auto all_items = sidebar_model->GetAllSidebarItems();
const auto& all_items = sidebar_model->GetAllSidebarItems();
const int item_num = all_items.size();
const int builtin_panel_item_total = 1;
const int builtin_panel_item_total = 2;
int builtin_panel_item_count = 0;
for (int i = 0; i < item_num; ++i) {
auto item = all_items[i];
Expand Down
30 changes: 0 additions & 30 deletions browser/resources/sidebar/BUILD.gn

This file was deleted.

85 changes: 0 additions & 85 deletions browser/resources/sidebar/bookmarks/BUILD.gn

This file was deleted.

Loading