Index: chrome/browser/ui/views/location_bar/add_to_app_launcher_view.h |
diff --git a/chrome/browser/ui/views/location_bar/content_setting_image_view.h b/chrome/browser/ui/views/location_bar/add_to_app_launcher_view.h |
similarity index 57% |
copy from chrome/browser/ui/views/location_bar/content_setting_image_view.h |
copy to chrome/browser/ui/views/location_bar/add_to_app_launcher_view.h |
index 4bd97ee018f4f925843d5d8e614a06db4d6c85b6..2d02305de31663515b223c64a1039ea30c5e9e98 100644 |
--- a/chrome/browser/ui/views/location_bar/content_setting_image_view.h |
+++ b/chrome/browser/ui/views/location_bar/add_to_app_launcher_view.h |
@@ -1,19 +1,16 @@ |
-// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CONTENT_SETTING_IMAGE_VIEW_H_ |
-#define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CONTENT_SETTING_IMAGE_VIEW_H_ |
+#ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ADD_TO_APP_LAUNCHER_VIEW_H_ |
+#define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ADD_TO_APP_LAUNCHER_VIEW_H_ |
#include "base/memory/scoped_ptr.h" |
-#include "chrome/common/content_settings_types.h" |
#include "ui/gfx/animation/animation_delegate.h" |
#include "ui/gfx/animation/slide_animation.h" |
#include "ui/views/painter.h" |
#include "ui/views/view.h" |
-#include "ui/views/widget/widget_observer.h" |
-class ContentSettingImageModel; |
class LocationBarView; |
namespace content { |
@@ -29,19 +26,15 @@ class ImageView; |
class Label; |
} |
-// The ContentSettingImageView displays an icon and optional text label for |
-// various content settings affordances in the location bar (i.e. plugin |
-// blocking, geolocation). |
-class ContentSettingImageView : public gfx::AnimationDelegate, |
- public views::View, |
- public views::WidgetObserver { |
+// The AddToAppLauncherView displays a UI to allow adding the current page to |
+// the App Launcher in the location bar. |
+class AddToAppLauncherView : public gfx::AnimationDelegate, public views::View { |
public: |
- ContentSettingImageView(ContentSettingsType content_type, |
- LocationBarView* parent, |
- const gfx::FontList& font_list, |
- SkColor text_color, |
- SkColor parent_background_color); |
- virtual ~ContentSettingImageView(); |
+ AddToAppLauncherView(LocationBarView* parent, |
+ const gfx::FontList& font_list, |
+ SkColor text_color, |
+ SkColor parent_background_color); |
+ virtual ~AddToAppLauncherView(); |
// Updates the decoration from the shown WebContents. |
void Update(content::WebContents* web_contents); |
@@ -70,14 +63,8 @@ class ContentSettingImageView : public gfx::AnimationDelegate, |
// views::View: |
virtual gfx::Size GetPreferredSize() const OVERRIDE; |
virtual void Layout() OVERRIDE; |
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; |
- virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; |
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; |
virtual void OnPaintBackground(gfx::Canvas* canvas) OVERRIDE; |
- // views::WidgetObserver: |
- virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE; |
- |
bool background_showing() const { |
return slide_animator_.is_animating() || pause_animation_; |
} |
@@ -86,16 +73,14 @@ class ContentSettingImageView : public gfx::AnimationDelegate, |
void OnClick(); |
calamity
2014/06/11 02:05:23
This isn't defined.
benwells
2014/06/11 04:09:48
Done.
|
LocationBarView* parent_; // Weak, owns us. |
- scoped_ptr<ContentSettingImageModel> content_setting_image_model_; |
scoped_ptr<views::Painter> background_painter_; |
views::ImageView* icon_; |
views::Label* text_label_; |
gfx::SlideAnimation slide_animator_; |
bool pause_animation_; |
double pause_animation_state_; |
calamity
2014/06/11 02:05:23
pause_animation_ and pause_animation_state_ are un
benwells
2014/06/11 04:09:48
Done.
|
- views::Widget* bubble_widget_; |
- DISALLOW_COPY_AND_ASSIGN(ContentSettingImageView); |
+ DISALLOW_COPY_AND_ASSIGN(AddToAppLauncherView); |
}; |
-#endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CONTENT_SETTING_IMAGE_VIEW_H_ |
+#endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ADD_TO_APP_LAUNCHER_VIEW_H_ |