| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_UI_GTK_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_GTK_H_ |
| 6 #define CHROME_BROWSER_UI_GTK_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_GTK_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h" | 12 #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h" |
| 13 #include "chrome/browser/ui/gtk/custom_button.h" | 13 #include "chrome/browser/ui/gtk/custom_button.h" |
| 14 #include "content/public/browser/notification_observer.h" | 14 #include "content/public/browser/notification_observer.h" |
| 15 #include "content/public/browser/notification_registrar.h" | 15 #include "content/public/browser/notification_registrar.h" |
| 16 #include "third_party/skia/include/core/SkBitmap.h" | 16 #include "third_party/skia/include/core/SkBitmap.h" |
| 17 | 17 |
| 18 class Browser; | 18 class Browser; |
| 19 class BrowserWindowGtk; | |
| 20 class Extension; | 19 class Extension; |
| 21 class SkBitmap; | 20 class SkBitmap; |
| 22 | 21 |
| 23 // Provides feedback to the user upon successful installation of an | 22 // Provides feedback to the user upon successful installation of an |
| 24 // extension. Depending on the type of extension, the BubbleGtk will | 23 // extension. Depending on the type of extension, the BubbleGtk will |
| 25 // point to: | 24 // point to: |
| 26 // OMNIBOX_KEYWORD-> The omnibox. | 25 // OMNIBOX_KEYWORD-> The omnibox. |
| 27 // BROWSER_ACTION -> The browserAction icon in the toolbar. | 26 // BROWSER_ACTION -> The browserAction icon in the toolbar. |
| 28 // PAGE_ACTION -> A preview of the page action icon in the location | 27 // PAGE_ACTION -> A preview of the page action icon in the location |
| 29 // bar which is shown while the BubbleGtk is shown. | 28 // bar which is shown while the BubbleGtk is shown. |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 // BubbleDelegateGtk: | 70 // BubbleDelegateGtk: |
| 72 virtual void BubbleClosing(BubbleGtk* bubble, bool closed_by_escape) OVERRIDE; | 71 virtual void BubbleClosing(BubbleGtk* bubble, bool closed_by_escape) OVERRIDE; |
| 73 | 72 |
| 74 // Calls Release() internally. Called internally via PostTask. | 73 // Calls Release() internally. Called internally via PostTask. |
| 75 void Close(); | 74 void Close(); |
| 76 | 75 |
| 77 static void OnButtonClick(GtkWidget* button, | 76 static void OnButtonClick(GtkWidget* button, |
| 78 ExtensionInstalledBubbleGtk* toolbar); | 77 ExtensionInstalledBubbleGtk* toolbar); |
| 79 | 78 |
| 80 const Extension* extension_; | 79 const Extension* extension_; |
| 81 Browser *browser_; | 80 Browser* browser_; |
| 82 SkBitmap icon_; | 81 SkBitmap icon_; |
| 83 content::NotificationRegistrar registrar_; | 82 content::NotificationRegistrar registrar_; |
| 84 BubbleType type_; | 83 BubbleType type_; |
| 85 | 84 |
| 86 // The number of times to retry showing the bubble if the browser action | 85 // The number of times to retry showing the bubble if the browser action |
| 87 // toolbar is animating. | 86 // toolbar is animating. |
| 88 int animation_wait_retries_; | 87 int animation_wait_retries_; |
| 89 | 88 |
| 90 // The 'x' that the user can press to hide the bubble shelf. | 89 // The 'x' that the user can press to hide the bubble shelf. |
| 91 scoped_ptr<CustomDrawButton> close_button_; | 90 scoped_ptr<CustomDrawButton> close_button_; |
| 92 | 91 |
| 93 BubbleGtk* bubble_; | 92 BubbleGtk* bubble_; |
| 94 | 93 |
| 95 DISALLOW_COPY_AND_ASSIGN(ExtensionInstalledBubbleGtk); | 94 DISALLOW_COPY_AND_ASSIGN(ExtensionInstalledBubbleGtk); |
| 96 }; | 95 }; |
| 97 | 96 |
| 98 #endif // CHROME_BROWSER_UI_GTK_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_GTK_H_ | 97 #endif // CHROME_BROWSER_UI_GTK_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_GTK_H_ |
| OLD | NEW |