OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_OPTIONS_EXCEPTION_EDITOR_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_OPTIONS_EXCEPTION_EDITOR_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_OPTIONS_EXCEPTION_EDITOR_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_OPTIONS_EXCEPTION_EDITOR_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 MessageBoxFlags::DialogButton button) const; | 69 MessageBoxFlags::DialogButton button) const; |
70 virtual bool Cancel(); | 70 virtual bool Cancel(); |
71 virtual bool Accept(); | 71 virtual bool Accept(); |
72 virtual views::View* GetContentsView(); | 72 virtual views::View* GetContentsView(); |
73 | 73 |
74 // views::Textfield::Controller overrides. Updates whether the user can | 74 // views::Textfield::Controller overrides. Updates whether the user can |
75 // accept the dialog as well as updating image views showing whether value is | 75 // accept the dialog as well as updating image views showing whether value is |
76 // valid. | 76 // valid. |
77 virtual void ContentsChanged(views::Textfield* sender, | 77 virtual void ContentsChanged(views::Textfield* sender, |
78 const std::wstring& new_contents); | 78 const std::wstring& new_contents); |
79 virtual bool HandleKeystroke(views::Textfield* sender, | 79 virtual bool HandleKeyEvent(views::Textfield* sender, |
80 const views::Textfield::Keystroke& key); | 80 const views::KeyEvent& key_event); |
81 | 81 |
82 private: | 82 private: |
83 void Init(); | 83 void Init(); |
84 | 84 |
85 views::Label* CreateLabel(int message_id); | 85 views::Label* CreateLabel(int message_id); |
86 | 86 |
87 // Returns true if we're adding a new item. | 87 // Returns true if we're adding a new item. |
88 bool is_new() const { return index_ == -1; } | 88 bool is_new() const { return index_ == -1; } |
89 | 89 |
90 bool IsPatternValid(const ContentSettingsPattern& pattern, | 90 bool IsPatternValid(const ContentSettingsPattern& pattern, |
(...skipping 14 matching lines...) Expand all Loading... |
105 | 105 |
106 views::Textfield* pattern_tf_; | 106 views::Textfield* pattern_tf_; |
107 views::ImageView* pattern_iv_; | 107 views::ImageView* pattern_iv_; |
108 views::Combobox* action_cb_; | 108 views::Combobox* action_cb_; |
109 views::Checkbox* incognito_cb_; | 109 views::Checkbox* incognito_cb_; |
110 | 110 |
111 DISALLOW_COPY_AND_ASSIGN(ExceptionEditorView); | 111 DISALLOW_COPY_AND_ASSIGN(ExceptionEditorView); |
112 }; | 112 }; |
113 | 113 |
114 #endif // CHROME_BROWSER_UI_VIEWS_OPTIONS_EXCEPTION_EDITOR_VIEW_H_ | 114 #endif // CHROME_BROWSER_UI_VIEWS_OPTIONS_EXCEPTION_EDITOR_VIEW_H_ |
OLD | NEW |