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

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

Issue 2354413003: Implement support for Mac Zoom following focus and caret (Closed)
Patch Set: Clean up and add comments Created 4 years, 2 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 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 <IOSurface/IOSurface.h> 9 #include <IOSurface/IOSurface.h>
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 SkColorType preferred_color_type) override; 295 SkColorType preferred_color_type) override;
296 void CopyFromCompositingSurfaceToVideoFrame( 296 void CopyFromCompositingSurfaceToVideoFrame(
297 const gfx::Rect& src_subrect, 297 const gfx::Rect& src_subrect,
298 const scoped_refptr<media::VideoFrame>& target, 298 const scoped_refptr<media::VideoFrame>& target,
299 const base::Callback<void(const gfx::Rect&, bool)>& callback) override; 299 const base::Callback<void(const gfx::Rect&, bool)>& callback) override;
300 bool CanCopyToVideoFrame() const override; 300 bool CanCopyToVideoFrame() const override;
301 void BeginFrameSubscription( 301 void BeginFrameSubscription(
302 std::unique_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) override; 302 std::unique_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) override;
303 void EndFrameSubscription() override; 303 void EndFrameSubscription() override;
304 ui::AcceleratedWidgetMac* GetAcceleratedWidgetMac() const override; 304 ui::AcceleratedWidgetMac* GetAcceleratedWidgetMac() const override;
305 void FocusedNodeChanged(bool is_editable_node,
306 const gfx::Rect& node_bounds_in_screen) override;
305 void OnSwapCompositorFrame(uint32_t compositor_frame_sink_id, 307 void OnSwapCompositorFrame(uint32_t compositor_frame_sink_id,
306 cc::CompositorFrame frame) override; 308 cc::CompositorFrame frame) override;
307 void ClearCompositorFrame() override; 309 void ClearCompositorFrame() override;
308 BrowserAccessibilityManager* CreateBrowserAccessibilityManager( 310 BrowserAccessibilityManager* CreateBrowserAccessibilityManager(
309 BrowserAccessibilityDelegate* delegate, bool for_root_frame) override; 311 BrowserAccessibilityDelegate* delegate, bool for_root_frame) override;
310 gfx::Point AccessibilityOriginInScreen(const gfx::Rect& bounds) override; 312 gfx::Point AccessibilityOriginInScreen(const gfx::Rect& bounds) override;
311 gfx::AcceleratedWidget AccessibilityGetAcceleratedWidget() override; 313 gfx::AcceleratedWidget AccessibilityGetAcceleratedWidget() override;
312 314
313 bool HasAcceleratedSurface(const gfx::Size& desired_size) override; 315 bool HasAcceleratedSurface(const gfx::Size& desired_size) override;
314 gfx::Rect GetBoundsInRootWindow() override; 316 gfx::Rect GetBoundsInRootWindow() override;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 348
347 // TextInputManager::Observer implementation. 349 // TextInputManager::Observer implementation.
348 void OnUpdateTextInputStateCalled(TextInputManager* text_input_manager, 350 void OnUpdateTextInputStateCalled(TextInputManager* text_input_manager,
349 RenderWidgetHostViewBase* updated_view, 351 RenderWidgetHostViewBase* updated_view,
350 bool did_update_state) override; 352 bool did_update_state) override;
351 void OnImeCancelComposition(TextInputManager* text_input_manager, 353 void OnImeCancelComposition(TextInputManager* text_input_manager,
352 RenderWidgetHostViewBase* updated_view) override; 354 RenderWidgetHostViewBase* updated_view) override;
353 void OnImeCompositionRangeChanged( 355 void OnImeCompositionRangeChanged(
354 TextInputManager* text_input_manager, 356 TextInputManager* text_input_manager,
355 RenderWidgetHostViewBase* updated_view) override; 357 RenderWidgetHostViewBase* updated_view) override;
358 void OnSelectionBoundsChanged(
359 TextInputManager* text_input_manager,
360 RenderWidgetHostViewBase* updated_view) override;
356 void OnTextSelectionChanged(TextInputManager* text_input_manager, 361 void OnTextSelectionChanged(TextInputManager* text_input_manager,
357 RenderWidgetHostViewBase* updated_view) override; 362 RenderWidgetHostViewBase* updated_view) override;
358 // IPC::Sender implementation. 363 // IPC::Sender implementation.
359 bool Send(IPC::Message* message) override; 364 bool Send(IPC::Message* message) override;
360 365
361 // display::DisplayObserver implementation. 366 // display::DisplayObserver implementation.
362 void OnDisplayAdded(const display::Display& new_display) override; 367 void OnDisplayAdded(const display::Display& new_display) override;
363 void OnDisplayRemoved(const display::Display& old_display) override; 368 void OnDisplayRemoved(const display::Display& old_display) override;
364 void OnDisplayMetricsChanged(const display::Display& display, 369 void OnDisplayMetricsChanged(const display::Display& display,
365 uint32_t metrics) override; 370 uint32_t metrics) override;
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 489
485 // IPC message handlers. 490 // IPC message handlers.
486 void OnGetRenderedTextCompleted(const std::string& text); 491 void OnGetRenderedTextCompleted(const std::string& text);
487 492
488 // Send updated vsync parameters to the top level display. 493 // Send updated vsync parameters to the top level display.
489 void UpdateDisplayVSyncParameters(); 494 void UpdateDisplayVSyncParameters();
490 495
491 // Dispatches a TTS session. 496 // Dispatches a TTS session.
492 void SpeakText(const std::string& text); 497 void SpeakText(const std::string& text);
493 498
499 // Get the focused view that should be used for retrieving the text selection.
500 RenderWidgetHostViewBase* GetFocusedViewForTextSelection();
501
494 // The associated view. This is weak and is inserted into the view hierarchy 502 // The associated view. This is weak and is inserted into the view hierarchy
495 // to own this RenderWidgetHostViewMac object. Set to nil at the start of the 503 // to own this RenderWidgetHostViewMac object. Set to nil at the start of the
496 // destructor. 504 // destructor.
497 RenderWidgetHostViewCocoa* cocoa_view_; 505 RenderWidgetHostViewCocoa* cocoa_view_;
498 506
499 // Indicates if the page is loading. 507 // Indicates if the page is loading.
500 bool is_loading_; 508 bool is_loading_;
501 509
502 // Whether it's allowed to pause waiting for a new frame. 510 // Whether it's allowed to pause waiting for a new frame.
503 bool allow_pause_for_resize_or_repaint_; 511 bool allow_pause_for_resize_or_repaint_;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 546
539 // Factory used to safely scope delayed calls to ShutdownHost(). 547 // Factory used to safely scope delayed calls to ShutdownHost().
540 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; 548 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_;
541 549
542 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); 550 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac);
543 }; 551 };
544 552
545 } // namespace content 553 } // namespace content
546 554
547 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 555 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698