Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(228)

Side by Side Diff: chrome/browser/ui/views/infobars/infobar_container_view.h

Issue 2705763002: InfoBarContainerView: Redraws infobars on a native theme change (Closed)
Patch Set: Address pkasting@'s comments Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/views/infobars/infobar_container_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 GetAccessibleNodeData(ui::AXNodeData* node_data) override; 28 void GetAccessibleNodeData(ui::AXNodeData* node_data) override;
29 void OnNativeThemeChanged(const ui::NativeTheme* theme) override;
29 30
30 // InfobarContainer: 31 // InfobarContainer:
31 void PlatformSpecificAddInfoBar(infobars::InfoBar* infobar, 32 void PlatformSpecificAddInfoBar(infobars::InfoBar* infobar,
32 size_t position) override; 33 size_t position) override;
33 void PlatformSpecificRemoveInfoBar(infobars::InfoBar* infobar) override; 34 void PlatformSpecificRemoveInfoBar(infobars::InfoBar* infobar) override;
34 35
35 private: 36 private:
36 // This view draws the shadow over the web contents below the 37 // 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 38 // lowest infobar. A separate view with a layer is used so it can
38 // draw outside the bounds of |this|. 39 // draw outside the bounds of |this|.
39 views::View* content_shadow_; 40 views::View* content_shadow_;
40 41
41 DISALLOW_COPY_AND_ASSIGN(InfoBarContainerView); 42 DISALLOW_COPY_AND_ASSIGN(InfoBarContainerView);
42 }; 43 };
43 44
44 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_CONTAINER_VIEW_H_ 45 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_CONTAINER_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/infobars/infobar_container_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698