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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_mac.h

Issue 102593002: Convert string16 to base::string16 in content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
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_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 // The range of current marked text inside the whole content of the DOM node 101 // The range of current marked text inside the whole content of the DOM node
102 // being edited. 102 // being edited.
103 // TODO(suzhe): This is currently a fake value, as we do not support accessing 103 // TODO(suzhe): This is currently a fake value, as we do not support accessing
104 // the whole content yet. 104 // the whole content yet.
105 NSRange markedRange_; 105 NSRange markedRange_;
106 106
107 // The selected range, cached from a message sent by the renderer. 107 // The selected range, cached from a message sent by the renderer.
108 NSRange selectedRange_; 108 NSRange selectedRange_;
109 109
110 // Text to be inserted which was generated by handling a key down event. 110 // Text to be inserted which was generated by handling a key down event.
111 string16 textToBeInserted_; 111 base::string16 textToBeInserted_;
112 112
113 // Marked text which was generated by handling a key down event. 113 // Marked text which was generated by handling a key down event.
114 string16 markedText_; 114 base::string16 markedText_;
115 115
116 // Underline information of the |markedText_|. 116 // Underline information of the |markedText_|.
117 std::vector<blink::WebCompositionUnderline> underlines_; 117 std::vector<blink::WebCompositionUnderline> underlines_;
118 118
119 // Indicates if doCommandBySelector method receives any edit command when 119 // Indicates if doCommandBySelector method receives any edit command when
120 // handling a key down event. 120 // handling a key down event.
121 BOOL hasEditCommands_; 121 BOOL hasEditCommands_;
122 122
123 // Contains edit commands received by the -doCommandBySelector: method when 123 // Contains edit commands received by the -doCommandBySelector: method when
124 // handling a key down event, not including inserting commands, eg. insertTab, 124 // handling a key down event, not including inserting commands, eg. insertTab,
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 const gfx::Range& range, 257 const gfx::Range& range,
258 const std::vector<gfx::Rect>& character_bounds) OVERRIDE; 258 const std::vector<gfx::Rect>& character_bounds) OVERRIDE;
259 virtual void DidUpdateBackingStore( 259 virtual void DidUpdateBackingStore(
260 const gfx::Rect& scroll_rect, 260 const gfx::Rect& scroll_rect,
261 const gfx::Vector2d& scroll_delta, 261 const gfx::Vector2d& scroll_delta,
262 const std::vector<gfx::Rect>& copy_rects, 262 const std::vector<gfx::Rect>& copy_rects,
263 const ui::LatencyInfo& latency_info) OVERRIDE; 263 const ui::LatencyInfo& latency_info) OVERRIDE;
264 virtual void RenderProcessGone(base::TerminationStatus status, 264 virtual void RenderProcessGone(base::TerminationStatus status,
265 int error_code) OVERRIDE; 265 int error_code) OVERRIDE;
266 virtual void Destroy() OVERRIDE; 266 virtual void Destroy() OVERRIDE;
267 virtual void SetTooltipText(const string16& tooltip_text) OVERRIDE; 267 virtual void SetTooltipText(const base::string16& tooltip_text) OVERRIDE;
268 virtual void SelectionChanged(const string16& text, 268 virtual void SelectionChanged(const base::string16& text,
269 size_t offset, 269 size_t offset,
270 const gfx::Range& range) OVERRIDE; 270 const gfx::Range& range) OVERRIDE;
271 virtual void SelectionBoundsChanged( 271 virtual void SelectionBoundsChanged(
272 const ViewHostMsg_SelectionBounds_Params& params) OVERRIDE; 272 const ViewHostMsg_SelectionBounds_Params& params) OVERRIDE;
273 virtual void ScrollOffsetChanged() OVERRIDE; 273 virtual void ScrollOffsetChanged() OVERRIDE;
274 virtual BackingStore* AllocBackingStore(const gfx::Size& size) OVERRIDE; 274 virtual BackingStore* AllocBackingStore(const gfx::Size& size) OVERRIDE;
275 virtual void CopyFromCompositingSurface( 275 virtual void CopyFromCompositingSurface(
276 const gfx::Rect& src_subrect, 276 const gfx::Rect& src_subrect,
277 const gfx::Size& dst_size, 277 const gfx::Size& dst_size,
278 const base::Callback<void(bool, const SkBitmap&)>& callback) OVERRIDE; 278 const base::Callback<void(bool, const SkBitmap&)>& callback) OVERRIDE;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 void ForwardMouseEvent(const blink::WebMouseEvent& event); 331 void ForwardMouseEvent(const blink::WebMouseEvent& event);
332 332
333 void KillSelf(); 333 void KillSelf();
334 334
335 void SetTextInputActive(bool active); 335 void SetTextInputActive(bool active);
336 336
337 // Change this view to use CoreAnimation to draw. 337 // Change this view to use CoreAnimation to draw.
338 void EnableCoreAnimation(); 338 void EnableCoreAnimation();
339 339
340 // Sends completed plugin IME notification and text back to the renderer. 340 // Sends completed plugin IME notification and text back to the renderer.
341 void PluginImeCompositionCompleted(const string16& text, int plugin_id); 341 void PluginImeCompositionCompleted(const base::string16& text, int plugin_id);
342 342
343 const std::string& selected_text() const { return selected_text_; } 343 const std::string& selected_text() const { return selected_text_; }
344 344
345 // Update the IOSurface to be drawn and call setNeedsDisplay on 345 // Update the IOSurface to be drawn and call setNeedsDisplay on
346 // |cocoa_view_|. 346 // |cocoa_view_|.
347 void CompositorSwapBuffers(uint64 surface_handle, 347 void CompositorSwapBuffers(uint64 surface_handle,
348 const gfx::Size& size, 348 const gfx::Size& size,
349 float scale_factor, 349 float scale_factor,
350 const ui::LatencyInfo& latency_info); 350 const ui::LatencyInfo& latency_info);
351 351
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 519
520 // The associated view. This is weak and is inserted into the view hierarchy 520 // The associated view. This is weak and is inserted into the view hierarchy
521 // to own this RenderWidgetHostViewMac object. Set to nil at the start of the 521 // to own this RenderWidgetHostViewMac object. Set to nil at the start of the
522 // destructor. 522 // destructor.
523 RenderWidgetHostViewCocoa* cocoa_view_; 523 RenderWidgetHostViewCocoa* cocoa_view_;
524 524
525 // Indicates if the page is loading. 525 // Indicates if the page is loading.
526 bool is_loading_; 526 bool is_loading_;
527 527
528 // The text to be shown in the tooltip, supplied by the renderer. 528 // The text to be shown in the tooltip, supplied by the renderer.
529 string16 tooltip_text_; 529 base::string16 tooltip_text_;
530 530
531 // Factory used to safely scope delayed calls to ShutdownHost(). 531 // Factory used to safely scope delayed calls to ShutdownHost().
532 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; 532 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_;
533 533
534 // selected text on the renderer. 534 // selected text on the renderer.
535 std::string selected_text_; 535 std::string selected_text_;
536 536
537 // The window used for popup widgets. 537 // The window used for popup widgets.
538 base::scoped_nsobject<NSWindow> popup_window_; 538 base::scoped_nsobject<NSWindow> popup_window_;
539 539
(...skipping 27 matching lines...) Expand all
567 scoped_ptr<RenderWidgetHostViewFrameSubscriber> frame_subscriber_; 567 scoped_ptr<RenderWidgetHostViewFrameSubscriber> frame_subscriber_;
568 568
569 base::WeakPtrFactory<RenderWidgetHostViewMac> 569 base::WeakPtrFactory<RenderWidgetHostViewMac>
570 software_frame_weak_ptr_factory_; 570 software_frame_weak_ptr_factory_;
571 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); 571 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac);
572 }; 572 };
573 573
574 } // namespace content 574 } // namespace content
575 575
576 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 576 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698