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 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 // Called to notify the PageAction that it should determine whether to be | 75 // Called to notify the PageAction that it should determine whether to be |
76 // visible or hidden. |contents| is the WebContents that is active, |url| is | 76 // visible or hidden. |contents| is the WebContents that is active, |url| is |
77 // the current page URL. | 77 // the current page URL. |
78 void UpdateVisibility(content::WebContents* contents, const GURL& url); | 78 void UpdateVisibility(content::WebContents* contents, const GURL& url); |
79 | 79 |
80 // Either notify listeners or show a popup depending on the page action. | 80 // Either notify listeners or show a popup depending on the page action. |
81 void ExecuteAction(ExtensionPopup::ShowAction show_action); | 81 void ExecuteAction(ExtensionPopup::ShowAction show_action); |
82 | 82 |
83 private: | 83 private: |
84 // Overridden from View. | 84 // Overridden from View. |
85 virtual void PaintChildren(gfx::Canvas* canvas) OVERRIDE; | 85 virtual void PaintChildren(gfx::Canvas* canvas, |
| 86 const views::CullSet& cull_set) OVERRIDE; |
86 | 87 |
87 // Shows the popup, with the given URL. | 88 // Shows the popup, with the given URL. |
88 void ShowPopupWithURL(const GURL& popup_url, | 89 void ShowPopupWithURL(const GURL& popup_url, |
89 ExtensionPopup::ShowAction show_action); | 90 ExtensionPopup::ShowAction show_action); |
90 | 91 |
91 // Hides the active popup, if there is one. | 92 // Hides the active popup, if there is one. |
92 void HidePopup(); | 93 void HidePopup(); |
93 | 94 |
94 // The location bar view that owns us. | 95 // The location bar view that owns us. |
95 LocationBarView* owner_; | 96 LocationBarView* owner_; |
(...skipping 30 matching lines...) Expand all Loading... |
126 // The extension command accelerator this page action is listening for (to | 127 // The extension command accelerator this page action is listening for (to |
127 // show the popup). | 128 // show the popup). |
128 scoped_ptr<ui::Accelerator> page_action_keybinding_; | 129 scoped_ptr<ui::Accelerator> page_action_keybinding_; |
129 | 130 |
130 scoped_ptr<views::MenuRunner> menu_runner_; | 131 scoped_ptr<views::MenuRunner> menu_runner_; |
131 | 132 |
132 DISALLOW_IMPLICIT_CONSTRUCTORS(PageActionImageView); | 133 DISALLOW_IMPLICIT_CONSTRUCTORS(PageActionImageView); |
133 }; | 134 }; |
134 | 135 |
135 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_PAGE_ACTION_IMAGE_VIEW_H_ | 136 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_PAGE_ACTION_IMAGE_VIEW_H_ |
OLD | NEW |