码迷,mamicode.com
首页 > 其他好文 > 详细

chromium 去掉登录按钮

时间:2021-05-24 05:30:41      阅读:0      评论:0      收藏:0      [点我收藏+]

标签:row   browser   HERE   int   bool   title   child   void   this   

嗯....登录按钮的关键字是Avatar 

对于这个按钮的绑定的功能

在C:\feikua\chromium\src\chrome\browser\ui\views\frame\browser_view.cc

void BrowserView::ShowAvatarBubbleFromAvatarButton(
    AvatarBubbleMode mode,
    signin_metrics::AccessPoint access_point,
    bool focus_first_profile_button) {
//  // Do not show avatar bubble if there is no avatar menu button.
//  views::Button* avatar_button =
//      toolbar_button_provider_->GetAvatarToolbarButton();
//  if (!avatar_button)
//    return;
//
//  profiles::BubbleViewMode bubble_view_mode;
//  profiles::BubbleViewModeFromAvatarBubbleMode(mode, GetProfile(),
//                                               &bubble_view_mode);
//#if !BUILDFLAG(IS_CHROMEOS_ASH)
//  if (SigninViewController::ShouldShowSigninForMode(bubble_view_mode)) {
//    browser_->signin_view_controller()->ShowSignin(bubble_view_mode,
//                                                   access_point);
//    return;
//  }
//#endif
//  ProfileMenuViewBase::ShowBubble(bubble_view_mode, avatar_button, browser(),
//                                  focus_first_profile_button);
}

 

去掉设置里面的你与goole在

C:\feikua\chromium\src\chrome\browser\resources\settings\basic_page\basic_page.html:

<!--
        <template is="dom-if" if="[[showPage_(pageVisibility.people)]]" restamp>
          <settings-section page-title="$i18n{peoplePageTitle}"
              section="people">
            <settings-people-page prefs="{{prefs}}"
                page-visibility="[[pageVisibility]]">
            </settings-people-page>
          </settings-section>
        </template>
-->

但是。。。。这并没有达到我们的效果

后来发现在C:\feikua\chromium\src\chrome\browser\ui\views\toolbar\toolbar_view.cc

这个就是取消菜单栏和登录按钮的绑定

  //if (toolbar_account_icon_container) {
  //  toolbar_account_icon_container_ =
  //      AddChildView(std::move(toolbar_account_icon_container));
  //  avatar_ = toolbar_account_icon_container_->avatar_button();
  //} else {
  //  // TODO(crbug.com/932818): Remove this once the
  //  // |kAutofillEnableToolbarStatusChip| is fully launched.
  //  avatar_ = AddChildView(std::make_unique<AvatarToolbarButton>(browser_));
  //  avatar_->SetVisible(show_avatar_toolbar_button);
  //}
 

chromium 去掉登录按钮

标签:row   browser   HERE   int   bool   title   child   void   this   

原文地址:https://www.cnblogs.com/Galesaur-wcy/p/14754982.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!