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

Side by Side Diff: ui/views/controls/textfield/textfield.h

Issue 2273263002: MacViewsBrowser: Fix omnibox crash due to failed DCHECK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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
OLDNEW
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 UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ 5 #ifndef UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_
6 #define UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ 6 #define UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 205
206 // View overrides: 206 // View overrides:
207 gfx::Insets GetInsets() const override; 207 gfx::Insets GetInsets() const override;
208 int GetBaseline() const override; 208 int GetBaseline() const override;
209 gfx::Size GetPreferredSize() const override; 209 gfx::Size GetPreferredSize() const override;
210 const char* GetClassName() const override; 210 const char* GetClassName() const override;
211 gfx::NativeCursor GetCursor(const ui::MouseEvent& event) override; 211 gfx::NativeCursor GetCursor(const ui::MouseEvent& event) override;
212 bool OnMousePressed(const ui::MouseEvent& event) override; 212 bool OnMousePressed(const ui::MouseEvent& event) override;
213 bool OnMouseDragged(const ui::MouseEvent& event) override; 213 bool OnMouseDragged(const ui::MouseEvent& event) override;
214 void OnMouseReleased(const ui::MouseEvent& event) override; 214 void OnMouseReleased(const ui::MouseEvent& event) override;
215
216 // OnKey[Pressed/Released] are virtual only so that they can be overridden in
msw 2016/08/25 17:02:51 Can we move these to protected (or private and fri
karandeepb 2016/08/26 01:41:56 Moved to private. Had to move TestTextfield out of
217 // tests. Subclasses should not override these, since it would interfere with
218 // the accounting related to the scheduled text edit command. Instead
219 // subclasses should use TextfieldController::HandleKeyEvent, to intercept the
220 // key event.
215 bool OnKeyPressed(const ui::KeyEvent& event) override; 221 bool OnKeyPressed(const ui::KeyEvent& event) override;
216 bool OnKeyReleased(const ui::KeyEvent& event) override; 222 bool OnKeyReleased(const ui::KeyEvent& event) override;
223
217 void OnGestureEvent(ui::GestureEvent* event) override; 224 void OnGestureEvent(ui::GestureEvent* event) override;
218 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; 225 bool AcceleratorPressed(const ui::Accelerator& accelerator) override;
219 bool CanHandleAccelerators() const override; 226 bool CanHandleAccelerators() const override;
220 void AboutToRequestFocusFromTabTraversal(bool reverse) override; 227 void AboutToRequestFocusFromTabTraversal(bool reverse) override;
221 bool SkipDefaultKeyEventProcessing(const ui::KeyEvent& event) override; 228 bool SkipDefaultKeyEventProcessing(const ui::KeyEvent& event) override;
222 bool GetDropFormats( 229 bool GetDropFormats(
223 int* formats, 230 int* formats,
224 std::set<ui::Clipboard::FormatType>* format_types) override; 231 std::set<ui::Clipboard::FormatType>* format_types) override;
225 bool CanDrop(const ui::OSExchangeData& data) override; 232 bool CanDrop(const ui::OSExchangeData& data) override;
226 int OnDragUpdated(const ui::DropTargetEvent& event) override; 233 int OnDragUpdated(const ui::DropTargetEvent& event) override;
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 491
485 // Used to bind callback functions to this object. 492 // Used to bind callback functions to this object.
486 base::WeakPtrFactory<Textfield> weak_ptr_factory_; 493 base::WeakPtrFactory<Textfield> weak_ptr_factory_;
487 494
488 DISALLOW_COPY_AND_ASSIGN(Textfield); 495 DISALLOW_COPY_AND_ASSIGN(Textfield);
489 }; 496 };
490 497
491 } // namespace views 498 } // namespace views
492 499
493 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ 500 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698