Commit 7e7d14a9 authored by Yasmin's avatar Yasmin Committed by Commit Bot

Add documents and some nits for sharing icon view.

Bug: 988461
Change-Id: I820bca05f073ef379178d7cf17fbbb7efbaba4c8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1764131Reviewed-by: default avatarEvan Stade <estade@chromium.org>
Reviewed-by: default avatarPeter Beverloo <peter@chromium.org>
Commit-Queue: Yasmin Molazadeh <yasmo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#689956}
parent 416d1cee
...@@ -68,7 +68,7 @@ bool SharingIconView::Update() { ...@@ -68,7 +68,7 @@ bool SharingIconView::Update() {
const bool is_bubble_showing = IsBubbleShowing(); const bool is_bubble_showing = IsBubbleShowing();
if (is_bubble_showing || isLoadingAnimationVisible() || if (is_bubble_showing || IsLoadingAnimationVisible() ||
last_controller_ != controller) { last_controller_ != controller) {
ResetSlideAnimation(/*show=*/false); ResetSlideAnimation(/*show=*/false);
} }
...@@ -76,7 +76,7 @@ bool SharingIconView::Update() { ...@@ -76,7 +76,7 @@ bool SharingIconView::Update() {
last_controller_ = controller; last_controller_ = controller;
const bool is_visible = const bool is_visible =
is_bubble_showing || isLoadingAnimationVisible() || label()->GetVisible(); is_bubble_showing || IsLoadingAnimationVisible() || label()->GetVisible();
const bool visibility_changed = GetVisible() != is_visible; const bool visibility_changed = GetVisible() != is_visible;
SetVisible(is_visible); SetVisible(is_visible);
...@@ -193,6 +193,6 @@ const gfx::VectorIcon& SharingIconView::GetVectorIconBadge() const { ...@@ -193,6 +193,6 @@ const gfx::VectorIcon& SharingIconView::GetVectorIconBadge() const {
void SharingIconView::OnExecuting( void SharingIconView::OnExecuting(
PageActionIconView::ExecuteSource execute_source) {} PageActionIconView::ExecuteSource execute_source) {}
bool SharingIconView::isLoadingAnimationVisible() { bool SharingIconView::IsLoadingAnimationVisible() {
return loading_animation_.get(); return loading_animation_.get();
} }
...@@ -44,12 +44,15 @@ class SharingIconView : public PageActionIconView { ...@@ -44,12 +44,15 @@ class SharingIconView : public PageActionIconView {
void UpdateInkDrop(bool activate); void UpdateInkDrop(bool activate);
void UpdateOpacity(); void UpdateOpacity();
void UpdateLoaderColor(); void UpdateLoaderColor();
bool isLoadingAnimationVisible(); bool IsLoadingAnimationVisible();
bool should_show_error() { return should_show_error_; } bool should_show_error() { return should_show_error_; }
void set_should_show_error(bool should_show_error) { void set_should_show_error(bool should_show_error) {
should_show_error_ = should_show_error; should_show_error_ = should_show_error;
} }
// Get the supporting controller for this icon view.
virtual SharingUiController* GetController() const = 0; virtual SharingUiController* GetController() const = 0;
// Return the success delivery message Id.
virtual base::Optional<int> GetSuccessMessageId() const = 0; virtual base::Optional<int> GetSuccessMessageId() const = 0;
private: private:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment