Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / cocoa / location_bar / page_action_decoration.mm
index 13ebf1f..f437100 100644 (file)
@@ -52,11 +52,7 @@ PageActionDecoration::PageActionDecoration(
       browser_(browser),
       page_action_(page_action),
       current_tab_id_(-1),
-      preview_enabled_(false),
-      scoped_icon_animation_observer_(
-          page_action->GetIconAnimation(
-              SessionID::IdForTab(owner->GetWebContents())),
-          this) {
+      preview_enabled_(false) {
   const Extension* extension = browser->profile()->GetExtensionService()->
       GetExtensionById(page_action->extension_id(), false);
   DCHECK(extension);
@@ -82,26 +78,6 @@ CGFloat PageActionDecoration::GetWidthForSpace(CGFloat width) {
   return extensions::IconsInfo::kPageActionIconMaxSize;
 }
 
-void PageActionDecoration::DrawWithBackgroundInFrame(NSRect background_frame,
-                                                     NSRect frame,
-                                                     NSView* control_view) {
-  {
-    gfx::Rect bounds(NSRectToCGRect(background_frame));
-    gfx::CanvasSkiaPaint canvas(background_frame, /*opaque=*/false);
-    // set_composite_alpha(true) makes the extension action paint on top of the
-    // location bar instead of whatever's behind the Chrome window.
-    canvas.set_composite_alpha(true);
-    location_bar_util::PaintExtensionActionBackground(
-        *page_action_, current_tab_id_,
-        &canvas, bounds,
-        SK_ColorBLACK, SK_ColorWHITE);
-    // Destroying |canvas| draws the background.
-  }
-
-  ImageDecoration::DrawWithBackgroundInFrame(
-      background_frame, frame, control_view);
-}
-
 bool PageActionDecoration::AcceptsMousePress() {
   return true;
 }
@@ -250,11 +226,6 @@ void PageActionDecoration::ShowPopup(const NSRect& frame,
                             devMode:NO];
 }
 
-void PageActionDecoration::OnIconChanged() {
-  UpdateVisibility(owner_->GetWebContents(), current_url_);
-  owner_->RedrawDecoration(this);
-}
-
 void PageActionDecoration::Observe(
     int type,
     const content::NotificationSource& source,