Skip to content

Commit

Permalink
Use chromium's side panel inside our side bar container, and insert R…
Browse files Browse the repository at this point in the history
…eading List

Chromium's side panel is controlled by Brave's side bar buttons, via chromium's side panel coordinator
  • Loading branch information
petemill committed Jun 17, 2022
1 parent 8a1c0e9 commit 1efc150
Show file tree
Hide file tree
Showing 69 changed files with 442 additions and 2,249 deletions.
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 @@ -32,6 +32,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,
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 @@ -182,11 +182,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 @@ -546,11 +541,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
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

0 comments on commit 1efc150

Please sign in to comment.