阅读 240

chromium 去掉登录按钮

chromium 去掉登录按钮


嗯....登录按钮的关键字是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);  //}

来源:https://www.cnblogs.com/Galesaur-wcy/p/14754982.html

服务器评测 http://www.cncsto.com/ 


文章分类
后端
文章标签
版权声明:本站是系统测试站点,无实际运营。本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 XXXXXXo@163.com 举报,一经查实,本站将立刻删除。
相关推荐