| OLD | NEW |
| 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_installed_bubble.h" | 5 #include "chrome/browser/ui/views/extensions/extension_installed_bubble.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 const int kRightcolumnVerticalShift = -4; | 68 const int kRightcolumnVerticalShift = -4; |
| 69 | 69 |
| 70 // How long to wait for browser action animations to complete before retrying. | 70 // How long to wait for browser action animations to complete before retrying. |
| 71 const int kAnimationWaitTime = 50; | 71 const int kAnimationWaitTime = 50; |
| 72 | 72 |
| 73 // How often we retry when waiting for browser action animation to end. | 73 // How often we retry when waiting for browser action animation to end. |
| 74 const int kAnimationWaitMaxRetry = 10; | 74 const int kAnimationWaitMaxRetry = 10; |
| 75 | 75 |
| 76 } // namespace | 76 } // namespace |
| 77 | 77 |
| 78 namespace browser { | 78 namespace chrome { |
| 79 | 79 |
| 80 void ShowExtensionInstalledBubble( | 80 void ShowExtensionInstalledBubble(const Extension* extension, |
| 81 const Extension* extension, | 81 Browser* browser, |
| 82 Browser* browser, | 82 const SkBitmap& icon) { |
| 83 const SkBitmap& icon) { | |
| 84 ExtensionInstalledBubble::Show(extension, browser, icon); | 83 ExtensionInstalledBubble::Show(extension, browser, icon); |
| 85 } | 84 } |
| 86 | 85 |
| 87 } // namespace browser | 86 } // namespace chrome |
| 88 | 87 |
| 89 // InstalledBubbleContent is the content view which is placed in the | 88 // InstalledBubbleContent is the content view which is placed in the |
| 90 // ExtensionInstalledBubble. It displays the install icon and explanatory | 89 // ExtensionInstalledBubble. It displays the install icon and explanatory |
| 91 // text about the installed extension. | 90 // text about the installed extension. |
| 92 class InstalledBubbleContent : public views::View, | 91 class InstalledBubbleContent : public views::View, |
| 93 public views::ButtonListener, | 92 public views::ButtonListener, |
| 94 public views::LinkListener { | 93 public views::LinkListener { |
| 95 public: | 94 public: |
| 96 InstalledBubbleContent(Browser* browser, | 95 InstalledBubbleContent(Browser* browser, |
| 97 const Extension* extension, | 96 const Extension* extension, |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 } | 481 } |
| 483 | 482 |
| 484 void ExtensionInstalledBubble::WindowClosing() { | 483 void ExtensionInstalledBubble::WindowClosing() { |
| 485 if (extension_ && type_ == PAGE_ACTION) { | 484 if (extension_ && type_ == PAGE_ACTION) { |
| 486 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser_); | 485 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser_); |
| 487 browser_view->GetLocationBarView()->SetPreviewEnabledPageAction( | 486 browser_view->GetLocationBarView()->SetPreviewEnabledPageAction( |
| 488 extension_->page_action(), | 487 extension_->page_action(), |
| 489 false); // preview_enabled | 488 false); // preview_enabled |
| 490 } | 489 } |
| 491 } | 490 } |
| OLD | NEW |