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

Side by Side Diff: chrome/browser/ui/views/chooser_content_view.h

Issue 2478863003: Fix the Web Bluetooth chooser when it is used on Chrome apps on non-Mac (Closed)
Patch Set: initialize pointer to be nullptr Created 4 years, 1 month 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/chooser_content_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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_CHOOSER_CONTENT_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_CHOOSER_CONTENT_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_CHOOSER_CONTENT_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_CHOOSER_CONTENT_VIEW_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 void OnRefreshStateChanged(bool refreshing) override; 56 void OnRefreshStateChanged(bool refreshing) override;
57 57
58 // views::StyledLabelListener: 58 // views::StyledLabelListener:
59 void StyledLabelLinkClicked(views::StyledLabel* label, 59 void StyledLabelLinkClicked(views::StyledLabel* label,
60 const gfx::Range& range, 60 const gfx::Range& range,
61 int event_flags) override; 61 int event_flags) override;
62 62
63 base::string16 GetWindowTitle() const; 63 base::string16 GetWindowTitle() const;
64 base::string16 GetDialogButtonLabel(ui::DialogButton button) const; 64 base::string16 GetDialogButtonLabel(ui::DialogButton button) const;
65 bool IsDialogButtonEnabled(ui::DialogButton button) const; 65 bool IsDialogButtonEnabled(ui::DialogButton button) const;
66 // Ownership of the view is passed to the caller. 66 views::StyledLabel* footnote_link() { return footnote_link_.get(); }
67 views::StyledLabel* CreateFootnoteView();
68 void Accept(); 67 void Accept();
69 void Cancel(); 68 void Cancel();
70 void Close(); 69 void Close();
71 void UpdateTableView(); 70 void UpdateTableView();
72 void SetGetHelpAndReScanLink(); 71 void SetGetHelpAndReScanLink();
73 72
74 private: 73 private:
75 friend class ChooserContentViewTest; 74 friend class ChooserContentViewTest;
76 friend class ChooserDialogViewTest; 75 friend class ChooserDialogViewTest;
77 FRIEND_TEST_ALL_PREFIXES(ChooserContentViewTest, InitialState); 76 FRIEND_TEST_ALL_PREFIXES(ChooserContentViewTest, InitialState);
78 FRIEND_TEST_ALL_PREFIXES(ChooserContentViewTest, AdapterOnAndOffAndOn); 77 FRIEND_TEST_ALL_PREFIXES(ChooserContentViewTest, AdapterOnAndOffAndOn);
79 FRIEND_TEST_ALL_PREFIXES(ChooserContentViewTest, 78 FRIEND_TEST_ALL_PREFIXES(ChooserContentViewTest,
80 DiscoveringAndNoOptionAddedAndIdle); 79 DiscoveringAndNoOptionAddedAndIdle);
81 FRIEND_TEST_ALL_PREFIXES(ChooserContentViewTest, 80 FRIEND_TEST_ALL_PREFIXES(ChooserContentViewTest,
82 DiscoveringAndOneOptionAddedAndSelectedAndIdle); 81 DiscoveringAndOneOptionAddedAndSelectedAndIdle);
83 FRIEND_TEST_ALL_PREFIXES(ChooserContentViewTest, ClickRescanLink); 82 FRIEND_TEST_ALL_PREFIXES(ChooserContentViewTest, ClickRescanLink);
84 FRIEND_TEST_ALL_PREFIXES(ChooserContentViewTest, ClickGetHelpLink); 83 FRIEND_TEST_ALL_PREFIXES(ChooserContentViewTest, ClickGetHelpLink);
85 84
86 std::unique_ptr<ChooserController> chooser_controller_; 85 std::unique_ptr<ChooserController> chooser_controller_;
87 views::TableView* table_view_ = nullptr; // Weak. 86 views::TableView* table_view_ = nullptr; // Weak.
88 views::View* table_parent_ = nullptr; // Weak. 87 views::View* table_parent_ = nullptr; // Weak.
89 views::StyledLabel* turn_adapter_off_help_ = nullptr; // Weak. 88 views::StyledLabel* turn_adapter_off_help_ = nullptr; // Weak.
90 views::Throbber* throbber_ = nullptr; // Weak. 89 views::Throbber* throbber_ = nullptr; // Weak.
91 views::StyledLabel* footnote_link_ = nullptr; // Weak. 90 std::unique_ptr<views::StyledLabel> footnote_link_;
92 base::string16 help_text_; 91 base::string16 help_text_;
93 base::string16 help_and_scanning_text_; 92 base::string16 help_and_scanning_text_;
94 base::string16 help_and_re_scan_text_; 93 base::string16 help_and_re_scan_text_;
95 gfx::Range help_text_range_; 94 gfx::Range help_text_range_;
96 gfx::Range re_scan_text_range_; 95 gfx::Range re_scan_text_range_;
97 96
98 DISALLOW_COPY_AND_ASSIGN(ChooserContentView); 97 DISALLOW_COPY_AND_ASSIGN(ChooserContentView);
99 }; 98 };
100 99
101 #endif // CHROME_BROWSER_UI_VIEWS_CHOOSER_CONTENT_VIEW_H_ 100 #endif // CHROME_BROWSER_UI_VIEWS_CHOOSER_CONTENT_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/chooser_content_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698