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

Side by Side Diff: ui/gfx/render_text.h

Issue 8965046: Coverity: Fixing pass by value bugs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing 100534 Created 9 years 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/cpp/dev/video_decoder_dev.cc ('k') | no next file » | 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 UI_GFX_RENDER_TEXT_H_ 5 #ifndef UI_GFX_RENDER_TEXT_H_
6 #define UI_GFX_RENDER_TEXT_H_ 6 #define UI_GFX_RENDER_TEXT_H_
7 #pragma once 7 #pragma once
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <vector> 10 #include <vector>
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 bool cursor_visible() const { return cursor_visible_; } 119 bool cursor_visible() const { return cursor_visible_; }
120 void set_cursor_visible(bool visible) { cursor_visible_ = visible; } 120 void set_cursor_visible(bool visible) { cursor_visible_ = visible; }
121 121
122 bool insert_mode() const { return insert_mode_; } 122 bool insert_mode() const { return insert_mode_; }
123 void ToggleInsertMode(); 123 void ToggleInsertMode();
124 124
125 bool focused() const { return focused_; } 125 bool focused() const { return focused_; }
126 void set_focused(bool focused) { focused_ = focused; } 126 void set_focused(bool focused) { focused_ = focused; }
127 127
128 const StyleRange& default_style() const { return default_style_; } 128 const StyleRange& default_style() const { return default_style_; }
129 void set_default_style(StyleRange style) { default_style_ = style; } 129 void set_default_style(const StyleRange& style) { default_style_ = style; }
130 130
131 const Rect& display_rect() const { return display_rect_; } 131 const Rect& display_rect() const { return display_rect_; }
132 void SetDisplayRect(const Rect& r); 132 void SetDisplayRect(const Rect& r);
133 133
134 // This cursor position corresponds to SelectionModel::selection_end. In 134 // This cursor position corresponds to SelectionModel::selection_end. In
135 // addition to representing the selection end, it's also where logical text 135 // addition to representing the selection end, it's also where logical text
136 // edits take place, and doesn't necessarily correspond to 136 // edits take place, and doesn't necessarily correspond to
137 // SelectionModel::caret_pos. 137 // SelectionModel::caret_pos.
138 size_t GetCursorPosition() const; 138 size_t GetCursorPosition() const;
139 void SetCursorPosition(size_t position); 139 void SetCursorPosition(size_t position);
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 // The cached bounds and offset are invalidated by changes to the cursor, 360 // The cached bounds and offset are invalidated by changes to the cursor,
361 // selection, font, and other operations that adjust the visible text bounds. 361 // selection, font, and other operations that adjust the visible text bounds.
362 bool cached_bounds_and_offset_valid_; 362 bool cached_bounds_and_offset_valid_;
363 363
364 DISALLOW_COPY_AND_ASSIGN(RenderText); 364 DISALLOW_COPY_AND_ASSIGN(RenderText);
365 }; 365 };
366 366
367 } // namespace gfx 367 } // namespace gfx
368 368
369 #endif // UI_GFX_RENDER_TEXT_H_ 369 #endif // UI_GFX_RENDER_TEXT_H_
OLDNEW
« no previous file with comments | « ppapi/cpp/dev/video_decoder_dev.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698