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

Side by Side Diff: content/renderer/render_widget.h

Issue 780343002: Remove always true guard (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
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 CONTENT_RENDERER_RENDER_WIDGET_H_ 5 #ifndef CONTENT_RENDERER_RENDER_WIDGET_H_
6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ 6 #define CONTENT_RENDERER_RENDER_WIDGET_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 10
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 284
285 // |show_ime| should be SHOW_IME_IF_NEEDED iff the update may cause the ime to 285 // |show_ime| should be SHOW_IME_IF_NEEDED iff the update may cause the ime to
286 // be displayed, e.g. after a tap on an input field on mobile. 286 // be displayed, e.g. after a tap on an input field on mobile.
287 // |change_source| should be FROM_NON_IME when the renderer has to wait for 287 // |change_source| should be FROM_NON_IME when the renderer has to wait for
288 // the browser to acknowledge the change before the renderer handles any more 288 // the browser to acknowledge the change before the renderer handles any more
289 // IME events. This is when the text change did not originate from the IME in 289 // IME events. This is when the text change did not originate from the IME in
290 // the browser side, such as changes by JavaScript or autofill. 290 // the browser side, such as changes by JavaScript or autofill.
291 void UpdateTextInputState(ShowIme show_ime, ChangeSource change_source); 291 void UpdateTextInputState(ShowIme show_ime, ChangeSource change_source);
292 #endif 292 #endif
293 293
294 #if defined(OS_MACOSX) || defined(USE_AURA) || defined(OS_ANDROID)
295 // Checks if the composition range or composition character bounds have been 294 // Checks if the composition range or composition character bounds have been
296 // changed. If they are changed, the new value will be sent to the browser 295 // changed. If they are changed, the new value will be sent to the browser
297 // process. This method does nothing when the browser process is not able to 296 // process. This method does nothing when the browser process is not able to
298 // handle composition range and composition character bounds. 297 // handle composition range and composition character bounds.
299 void UpdateCompositionInfo(bool should_update_range); 298 void UpdateCompositionInfo(bool should_update_range);
300 #endif
301 299
302 #if defined(OS_ANDROID) 300 #if defined(OS_ANDROID)
303 void DidChangeBodyBackgroundColor(SkColor bg_color); 301 void DidChangeBodyBackgroundColor(SkColor bg_color);
304 #endif 302 #endif
305 303
306 protected: 304 protected:
307 // Friend RefCounted so that the dtor can be non-public. Using this class 305 // Friend RefCounted so that the dtor can be non-public. Using this class
308 // without ref-counting is an error. 306 // without ref-counting is an error.
309 friend class base::RefCounted<RenderWidget>; 307 friend class base::RefCounted<RenderWidget>;
310 // For unit tests. 308 // For unit tests.
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 scoped_refptr<IPC::SyncMessageFilter> sync_message_filter, 465 scoped_refptr<IPC::SyncMessageFilter> sync_message_filter,
468 bool commit_requested, 466 bool commit_requested,
469 int source_frame_number); 467 int source_frame_number);
470 468
471 // Override point to obtain that the current input method state and caret 469 // Override point to obtain that the current input method state and caret
472 // position. 470 // position.
473 virtual ui::TextInputType GetTextInputType(); 471 virtual ui::TextInputType GetTextInputType();
474 virtual ui::TextInputType WebKitToUiTextInputType( 472 virtual ui::TextInputType WebKitToUiTextInputType(
475 blink::WebTextInputType type); 473 blink::WebTextInputType type);
476 474
477 #if defined(OS_MACOSX) || defined(USE_AURA) || defined(OS_ANDROID)
478 // Override point to obtain that the current composition character bounds. 475 // Override point to obtain that the current composition character bounds.
479 // In the case of surrogate pairs, the character is treated as two characters: 476 // In the case of surrogate pairs, the character is treated as two characters:
480 // the bounds for first character is actual one, and the bounds for second 477 // the bounds for first character is actual one, and the bounds for second
481 // character is zero width rectangle. 478 // character is zero width rectangle.
482 virtual void GetCompositionCharacterBounds( 479 virtual void GetCompositionCharacterBounds(
483 std::vector<gfx::Rect>* character_bounds); 480 std::vector<gfx::Rect>* character_bounds);
484 481
485 // Returns the range of the text that is being composed or the selection if 482 // Returns the range of the text that is being composed or the selection if
486 // the composition does not exist. 483 // the composition does not exist.
487 virtual void GetCompositionRange(gfx::Range* range); 484 virtual void GetCompositionRange(gfx::Range* range);
488 485
489 // Returns true if the composition range or composition character bounds 486 // Returns true if the composition range or composition character bounds
490 // should be sent to the browser process. 487 // should be sent to the browser process.
491 bool ShouldUpdateCompositionInfo( 488 bool ShouldUpdateCompositionInfo(
492 const gfx::Range& range, 489 const gfx::Range& range,
493 const std::vector<gfx::Rect>& bounds); 490 const std::vector<gfx::Rect>& bounds);
494 #endif
495 491
496 // Override point to obtain that the current input method state about 492 // Override point to obtain that the current input method state about
497 // composition text. 493 // composition text.
498 virtual bool CanComposeInline(); 494 virtual bool CanComposeInline();
499 495
500 // Tells the renderer it does not have focus. Used to prevent us from getting 496 // Tells the renderer it does not have focus. Used to prevent us from getting
501 // the focus on our own when the browser did not focus us. 497 // the focus on our own when the browser did not focus us.
502 void ClearFocus(); 498 void ClearFocus();
503 499
504 // Set the pending window rect. 500 // Set the pending window rect.
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 ui::MenuSourceType context_menu_source_type_; 761 ui::MenuSourceType context_menu_source_type_;
766 bool has_host_context_menu_location_; 762 bool has_host_context_menu_location_;
767 gfx::Point host_context_menu_location_; 763 gfx::Point host_context_menu_location_;
768 764
769 DISALLOW_COPY_AND_ASSIGN(RenderWidget); 765 DISALLOW_COPY_AND_ASSIGN(RenderWidget);
770 }; 766 };
771 767
772 } // namespace content 768 } // namespace content
773 769
774 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ 770 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698