| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 void OnGestureEvent(ui::GestureEvent* event) override; | 50 void OnGestureEvent(ui::GestureEvent* event) override; |
| 51 | 51 |
| 52 // Called to notify the PageAction that it should determine whether to be | 52 // Called to notify the PageAction that it should determine whether to be |
| 53 // visible or hidden. |contents| is the WebContents that is active. | 53 // visible or hidden. |contents| is the WebContents that is active. |
| 54 void UpdateVisibility(content::WebContents* contents); | 54 void UpdateVisibility(content::WebContents* contents); |
| 55 | 55 |
| 56 private: | 56 private: |
| 57 static const char kViewClassName[]; | 57 static const char kViewClassName[]; |
| 58 | 58 |
| 59 // Overridden from View. | 59 // Overridden from View. |
| 60 void PaintChildren(const PaintContext& context) override; | 60 void PaintChildren(const ui::PaintContext& context) override; |
| 61 | 61 |
| 62 // ToolbarActionViewDelegateViews: | 62 // ToolbarActionViewDelegateViews: |
| 63 void UpdateState() override; | 63 void UpdateState() override; |
| 64 views::View* GetAsView() override; | 64 views::View* GetAsView() override; |
| 65 bool IsShownInMenu() override; | 65 bool IsShownInMenu() override; |
| 66 views::FocusManager* GetFocusManagerForAccelerator() override; | 66 views::FocusManager* GetFocusManagerForAccelerator() override; |
| 67 views::Widget* GetParentForContextMenu() override; | 67 views::Widget* GetParentForContextMenu() override; |
| 68 ToolbarActionViewController* GetPreferredPopupViewController() override; | 68 ToolbarActionViewController* GetPreferredPopupViewController() override; |
| 69 views::View* GetReferenceViewForPopup() override; | 69 views::View* GetReferenceViewForPopup() override; |
| 70 views::MenuButton* GetContextMenuButton() override; | 70 views::MenuButton* GetContextMenuButton() override; |
| 71 content::WebContents* GetCurrentWebContents() const override; | 71 content::WebContents* GetCurrentWebContents() const override; |
| 72 | 72 |
| 73 // The controller for this ExtensionAction view. | 73 // The controller for this ExtensionAction view. |
| 74 scoped_ptr<ExtensionActionViewController> view_controller_; | 74 scoped_ptr<ExtensionActionViewController> view_controller_; |
| 75 | 75 |
| 76 // The location bar view that owns us. | 76 // The location bar view that owns us. |
| 77 LocationBarView* owner_; | 77 LocationBarView* owner_; |
| 78 | 78 |
| 79 // The string to show for a tooltip; | 79 // The string to show for a tooltip; |
| 80 std::string tooltip_; | 80 std::string tooltip_; |
| 81 | 81 |
| 82 // This is used for post-install visual feedback. The page_action icon is | 82 // This is used for post-install visual feedback. The page_action icon is |
| 83 // briefly shown even if it hasn't been enabled by its extension. | 83 // briefly shown even if it hasn't been enabled by its extension. |
| 84 bool preview_enabled_; | 84 bool preview_enabled_; |
| 85 | 85 |
| 86 DISALLOW_IMPLICIT_CONSTRUCTORS(PageActionImageView); | 86 DISALLOW_IMPLICIT_CONSTRUCTORS(PageActionImageView); |
| 87 }; | 87 }; |
| 88 | 88 |
| 89 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_PAGE_ACTION_IMAGE_VIEW_H_ | 89 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_PAGE_ACTION_IMAGE_VIEW_H_ |
| OLD | NEW |