Chromium Code Reviews| Index: chrome/browser/renderer_context_menu/render_view_context_menu_browsertest_util.h |
| diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest_util.h b/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest_util.h |
| index c8cd6e47f69d85c1afc2d829a5da70838338c5b7..78f041f2238ef1c655a542a4a6f99842aae63701 100644 |
| --- a/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest_util.h |
| +++ b/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest_util.h |
| @@ -32,21 +32,19 @@ class ContextMenuNotificationObserver : public content::NotificationObserver { |
| DISALLOW_COPY_AND_ASSIGN(ContextMenuNotificationObserver); |
| }; |
| -class SaveLinkAsContextMenuObserver : public ContextMenuNotificationObserver { |
| +class ContextMenuWaiter : public content::NotificationObserver { |
| public: |
| // Register to listen for notifications of |
| // NOTIFICATION_RENDER_VIEW_CONTEXT_MENU_SHOWN from either |
| // a specific source, or from all sources if |source| is |
| // NotificationService::AllSources(). |
| - explicit SaveLinkAsContextMenuObserver( |
| - const content::NotificationSource& source); |
| - ~SaveLinkAsContextMenuObserver() override; |
| + explicit ContextMenuWaiter(const content::NotificationSource& source); |
| + ~ContextMenuWaiter() override; |
| - // Suggested filename for file downloaded through "Save Link As" option. |
| - base::string16 GetSuggestedFilename(); |
| + content::ContextMenuParams& params(); |
| - // Wait for context menu to be visible. |
| - void WaitForMenu(); |
| + // Wait until opening the context menu and closing. |
|
pkotwicz
2015/02/17 19:59:29
Nit: "Wait until the context menu is opened and cl
Miyoung Shin
2015/02/18 12:10:33
Done.
|
| + void WaitForMenuOpenAndClose(); |
| private: |
| void Observe(int type, |
| @@ -57,8 +55,9 @@ class SaveLinkAsContextMenuObserver : public ContextMenuNotificationObserver { |
| bool menu_visible_; |
| content::ContextMenuParams params_; |
| + content::NotificationRegistrar registrar_; |
| - DISALLOW_COPY_AND_ASSIGN(SaveLinkAsContextMenuObserver); |
| + DISALLOW_COPY_AND_ASSIGN(ContextMenuWaiter); |
| }; |
| #endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_BROWSERTEST_UTIL_H_ |