| 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 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_PAGE_ACTION_IMAGE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_PAGE_ACTION_IMAGE_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_PAGE_ACTION_IMAGE_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_PAGE_ACTION_IMAGE_VIEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 72 |
| 73 // Called to notify the PageAction that it should determine whether to be | 73 // Called to notify the PageAction that it should determine whether to be |
| 74 // visible or hidden. |contents| is the WebContents that is active, |url| is | 74 // visible or hidden. |contents| is the WebContents that is active, |url| is |
| 75 // the current page URL. | 75 // the current page URL. |
| 76 void UpdateVisibility(content::WebContents* contents, const GURL& url); | 76 void UpdateVisibility(content::WebContents* contents, const GURL& url); |
| 77 | 77 |
| 78 // Either notify listeners or show a popup depending on the page action. | 78 // Either notify listeners or show a popup depending on the page action. |
| 79 void ExecuteAction(int button); | 79 void ExecuteAction(int button); |
| 80 | 80 |
| 81 private: | 81 private: |
| 82 // Shows the popup, with the given URL. |
| 83 void ShowPopupWithURL(const GURL& popup_url); |
| 84 |
| 82 // Hides the active popup, if there is one. | 85 // Hides the active popup, if there is one. |
| 83 void HidePopup(); | 86 void HidePopup(); |
| 84 | 87 |
| 85 // The location bar view that owns us. | 88 // The location bar view that owns us. |
| 86 LocationBarView* owner_; | 89 LocationBarView* owner_; |
| 87 | 90 |
| 88 // The PageAction that this view represents. The PageAction is not owned by | 91 // The PageAction that this view represents. The PageAction is not owned by |
| 89 // us, it resides in the extension of this particular profile. | 92 // us, it resides in the extension of this particular profile. |
| 90 ExtensionAction* page_action_; | 93 ExtensionAction* page_action_; |
| 91 | 94 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 121 // The extension keybinding accelerator this page action is listening for (to | 124 // The extension keybinding accelerator this page action is listening for (to |
| 122 // show the popup). | 125 // show the popup). |
| 123 scoped_ptr<ui::Accelerator> keybinding_; | 126 scoped_ptr<ui::Accelerator> keybinding_; |
| 124 | 127 |
| 125 scoped_ptr<views::MenuRunner> menu_runner_; | 128 scoped_ptr<views::MenuRunner> menu_runner_; |
| 126 | 129 |
| 127 DISALLOW_IMPLICIT_CONSTRUCTORS(PageActionImageView); | 130 DISALLOW_IMPLICIT_CONSTRUCTORS(PageActionImageView); |
| 128 }; | 131 }; |
| 129 | 132 |
| 130 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_PAGE_ACTION_IMAGE_VIEW_H_ | 133 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_PAGE_ACTION_IMAGE_VIEW_H_ |
| OLD | NEW |