• googleo's avatar
    Replace OnPageTranslate Observer by a responder of delegate. · e65dd51e
    googleo authored
    In order to be notified that page is translated, we simply implement CompactInfobar as observer of Translate Driver.
    But now we found from the translate button is clicked to the page is translated, there are many steps. If any step is returned, we are not be notified at all.
    
    In order to fix the loose relationship, we create a responder inside the delegate.
    So no matter what delegate is going to do, we will be notified, which keep infobar always consistent with delegate.
    
    What's more, on some corner cases listed in bug/723426, the relationship between infobar and translate driver causes crash. And the new strong relationship will fix it.
    
    BUG=720164,703887,723426, 724428
    TBR=dfalcantara@chromium.org
    
    Review-Url: https://codereview.chromium.org/2894553002
    Cr-Commit-Position: refs/heads/master@{#473799}
    e65dd51e
translate_compact_infobar.cc 6.53 KB