Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Side by Side Diff: chrome/browser/ui/views/extensions/extension_install_dialog_view.cc

Issue 2188133002: Scroll with Layers in views::ScrollView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20160728-MacViews-ScrollTrack
Patch Set: bugref, scale_delta DCHECK + comment Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/extensions/extension_install_dialog_view.h" 5 #include "chrome/browser/ui/views/extensions/extension_install_dialog_view.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 // Note: Do not span the permissions here, there's a separator in between! 479 // Note: Do not span the permissions here, there's a separator in between!
480 } else { 480 } else {
481 // Also span the scrollable container with permissions, retained files etc. 481 // Also span the scrollable container with permissions, retained files etc.
482 icon_row_span += 1; 482 icon_row_span += 1;
483 } 483 }
484 layout->AddView(icon, 1, icon_row_span); 484 layout->AddView(icon, 1, icon_row_span);
485 485
486 return layout; 486 return layout;
487 } 487 }
488 488
489 void ExtensionInstallDialogView::OnNativeThemeChanged(
490 const ui::NativeTheme* theme) {
491 scroll_view_->SetBackgroundColor(
492 theme->GetSystemColor(ui::NativeTheme::kColorId_DialogBackground));
493 }
494
489 int ExtensionInstallDialogView::GetDialogButtons() const { 495 int ExtensionInstallDialogView::GetDialogButtons() const {
490 int buttons = prompt_->GetDialogButtons(); 496 int buttons = prompt_->GetDialogButtons();
491 // Simply having just an OK button is *not* supported. See comment on function 497 // Simply having just an OK button is *not* supported. See comment on function
492 // GetDialogButtons in dialog_delegate.h for reasons. 498 // GetDialogButtons in dialog_delegate.h for reasons.
493 DCHECK_GT(buttons & ui::DIALOG_BUTTON_CANCEL, 0); 499 DCHECK_GT(buttons & ui::DIALOG_BUTTON_CANCEL, 0);
494 return buttons; 500 return buttons;
495 } 501 }
496 502
497 base::string16 ExtensionInstallDialogView::GetDialogButtonLabel( 503 base::string16 ExtensionInstallDialogView::GetDialogButtonLabel(
498 ui::DialogButton button) const { 504 ui::DialogButton button) const {
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 expanded ? gfx::VectorIconId::FIND_PREV : gfx::VectorIconId::FIND_NEXT, 747 expanded ? gfx::VectorIconId::FIND_PREV : gfx::VectorIconId::FIND_NEXT,
742 gfx::kChromeIconGrey); 748 gfx::kChromeIconGrey);
743 arrow_toggle_->SetImage(views::Button::STATE_NORMAL, &icon); 749 arrow_toggle_->SetImage(views::Button::STATE_NORMAL, &icon);
744 } 750 }
745 751
746 // static 752 // static
747 ExtensionInstallPrompt::ShowDialogCallback 753 ExtensionInstallPrompt::ShowDialogCallback
748 ExtensionInstallPrompt::GetViewsShowDialogCallback() { 754 ExtensionInstallPrompt::GetViewsShowDialogCallback() {
749 return base::Bind(&ShowExtensionInstallDialogImpl); 755 return base::Bind(&ShowExtensionInstallDialogImpl);
750 } 756 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/extensions/extension_install_dialog_view.h ('k') | ui/compositor/compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698