| 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_VIEWS_INFOBARS_INFOBAR_CONTAINER_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_CONTAINER_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_CONTAINER_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_CONTAINER_VIEW_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "components/infobars/core/infobar_container.h" | 11 #include "components/infobars/core/infobar_container.h" |
| 12 #include "ui/views/accessible_pane_view.h" | 12 #include "ui/views/accessible_pane_view.h" |
| 13 #include "ui/views/view_targeter_delegate.h" | 13 #include "ui/views/view_targeter_delegate.h" |
| 14 | 14 |
| 15 // The views-specific implementation of InfoBarContainer. | 15 // The views-specific implementation of InfoBarContainer. |
| 16 class InfoBarContainerView : public views::AccessiblePaneView, | 16 class InfoBarContainerView : public views::AccessiblePaneView, |
| 17 public infobars::InfoBarContainer { | 17 public infobars::InfoBarContainer { |
| 18 public: | 18 public: |
| 19 static const char kViewClassName[]; | 19 static const char kViewClassName[]; |
| 20 | 20 |
| 21 explicit InfoBarContainerView(Delegate* delegate); | 21 explicit InfoBarContainerView(Delegate* delegate); |
| 22 ~InfoBarContainerView() override; | 22 ~InfoBarContainerView() override; |
| 23 | 23 |
| 24 // AccessiblePaneView: | 24 // AccessiblePaneView: |
| 25 gfx::Size GetPreferredSize() const override; | 25 gfx::Size GetPreferredSize() const override; |
| 26 const char* GetClassName() const override; | 26 const char* GetClassName() const override; |
| 27 void Layout() override; | 27 void Layout() override; |
| 28 void GetAccessibleState(ui::AXViewState* state) override; | 28 void GetAccessibleNodeData(ui::AXNodeData* node_data) override; |
| 29 | 29 |
| 30 // InfobarContainer: | 30 // InfobarContainer: |
| 31 void PlatformSpecificAddInfoBar(infobars::InfoBar* infobar, | 31 void PlatformSpecificAddInfoBar(infobars::InfoBar* infobar, |
| 32 size_t position) override; | 32 size_t position) override; |
| 33 void PlatformSpecificRemoveInfoBar(infobars::InfoBar* infobar) override; | 33 void PlatformSpecificRemoveInfoBar(infobars::InfoBar* infobar) override; |
| 34 | 34 |
| 35 private: | 35 private: |
| 36 // This view draws the shadow over the web contents below the | 36 // This view draws the shadow over the web contents below the |
| 37 // lowest infobar. A separate view with a layer is used so it can | 37 // lowest infobar. A separate view with a layer is used so it can |
| 38 // draw outside the bounds of |this|. | 38 // draw outside the bounds of |this|. |
| 39 views::View* content_shadow_; | 39 views::View* content_shadow_; |
| 40 | 40 |
| 41 DISALLOW_COPY_AND_ASSIGN(InfoBarContainerView); | 41 DISALLOW_COPY_AND_ASSIGN(InfoBarContainerView); |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_CONTAINER_VIEW_H_ | 44 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_CONTAINER_VIEW_H_ |
| OLD | NEW |