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

Commit

Permalink
Fix LayoutProvider not being available on Debian
Browse files Browse the repository at this point in the history
Auditors: @bridiver
  • Loading branch information
bbondy authored and hferreiro committed Jun 29, 2017
1 parent 88ed1cb commit f044e9e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions atom/browser/ui/views/menu_bar.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ void MenuBar::SetMenu(AtomMenuModel* model) {
button->SetTextColor(views::Button::STATE_PRESSED, highlight_color_);
button->SetTextColor(views::Button::STATE_HOVERED, hover_color_);
button->SetUnderlineColor(enabled_color_);
button->SetEnabledTextColors(SK_ColorBLACK);
#elif defined(OS_WIN)
button->SetUnderlineColor(color_utils::GetSysSkColor(COLOR_GRAYTEXT));
#endif
Expand Down
8 changes: 8 additions & 0 deletions chromium_src/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,14 @@ source_set("browser") {
"//chrome/browser/extensions/global_shortcut_listener_x11.cc",
"//chrome/browser/extensions/global_shortcut_listener_x11.h",
"chrome/browser/ui/process_singleton_dialog_linux.cc",
"//chrome/browser/ui/views/harmony/chrome_layout_provider.cc",
"//chrome/browser/ui/views/harmony/chrome_layout_provider.h",
"//chrome/browser/ui/views/harmony/chrome_typography.cc",
"//chrome/browser/ui/views/harmony/chrome_typography.h",
"//chrome/browser/ui/views/harmony/harmony_layout_provider.cc",
"//chrome/browser/ui/views/harmony/harmony_layout_provider.h",
"//chrome/browser/ui/views/harmony/harmony_typography_provider.cc",
"//chrome/browser/ui/views/harmony/harmony_typography_provider.h",
]
}

Expand Down
5 changes: 4 additions & 1 deletion vendor/brightray/browser/browser_main_parts.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

#if defined(TOOLKIT_VIEWS)
#include "browser/views/views_delegate.h"
#include "chrome/browser/ui/views/harmony/harmony_layout_provider.h"
#endif

#if defined(USE_X11)
Expand Down Expand Up @@ -186,7 +187,9 @@ void BrowserMainParts::ToolkitInitialized() {
#endif

#if defined(TOOLKIT_VIEWS)
views_delegate_.reset(new ViewsDelegate);
views_delegate_ = base::MakeUnique<ViewsDelegate>();
if (!views::LayoutProvider::Get())
layout_provider_ = ChromeLayoutProvider::CreateLayoutProvider();
#endif

#if defined(OS_WIN)
Expand Down
4 changes: 4 additions & 0 deletions vendor/brightray/browser/browser_main_parts.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
namespace brightray {
class ViewsDelegate;
}
namespace views {
class LayoutProvider;
}
#endif

#if defined(USE_AURA) && defined(USE_X11)
Expand Down Expand Up @@ -46,6 +49,7 @@ class BrowserMainParts : public content::BrowserMainParts {

#if defined(TOOLKIT_VIEWS)
std::unique_ptr<ViewsDelegate> views_delegate_;
std::unique_ptr<views::LayoutProvider> layout_provider_;
#endif

#if defined(USE_AURA) && defined(USE_X11)
Expand Down

0 comments on commit f044e9e

Please sign in to comment.