| OLD | NEW |
| 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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 bool IsSurfaceAvailableForCopy() const override; | 265 bool IsSurfaceAvailableForCopy() const override; |
| 266 void Show() override; | 266 void Show() override; |
| 267 void Hide() override; | 267 void Hide() override; |
| 268 bool IsShowing() override; | 268 bool IsShowing() override; |
| 269 void WasUnOccluded() override; | 269 void WasUnOccluded() override; |
| 270 void WasOccluded() override; | 270 void WasOccluded() override; |
| 271 gfx::Rect GetViewBounds() const override; | 271 gfx::Rect GetViewBounds() const override; |
| 272 void SetShowingContextMenu(bool showing) override; | 272 void SetShowingContextMenu(bool showing) override; |
| 273 void SetActive(bool active) override; | 273 void SetActive(bool active) override; |
| 274 void ShowDefinitionForSelection() override; | 274 void ShowDefinitionForSelection() override; |
| 275 bool SupportsSpeech() const override; | |
| 276 void SpeakSelection() override; | 275 void SpeakSelection() override; |
| 277 bool IsSpeaking() const override; | |
| 278 void StopSpeaking() override; | |
| 279 void SetBackgroundColor(SkColor color) override; | 276 void SetBackgroundColor(SkColor color) override; |
| 280 | 277 |
| 281 // Implementation of RenderWidgetHostViewBase. | 278 // Implementation of RenderWidgetHostViewBase. |
| 282 void InitAsPopup(RenderWidgetHostView* parent_host_view, | 279 void InitAsPopup(RenderWidgetHostView* parent_host_view, |
| 283 const gfx::Rect& pos) override; | 280 const gfx::Rect& pos) override; |
| 284 void InitAsFullscreen(RenderWidgetHostView* reference_host_view) override; | 281 void InitAsFullscreen(RenderWidgetHostView* reference_host_view) override; |
| 285 void Focus() override; | 282 void Focus() override; |
| 286 void UpdateCursor(const WebCursor& cursor) override; | 283 void UpdateCursor(const WebCursor& cursor) override; |
| 287 void SetIsLoading(bool is_loading) override; | 284 void SetIsLoading(bool is_loading) override; |
| 288 void TextInputStateChanged(const TextInputState& params) override; | 285 void TextInputStateChanged(const TextInputState& params) override; |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 void EnsureBrowserCompositorView(); | 546 void EnsureBrowserCompositorView(); |
| 550 void SuspendBrowserCompositorView(); | 547 void SuspendBrowserCompositorView(); |
| 551 void DestroyBrowserCompositorView(); | 548 void DestroyBrowserCompositorView(); |
| 552 | 549 |
| 553 // IPC message handlers. | 550 // IPC message handlers. |
| 554 void OnGetRenderedTextCompleted(const std::string& text); | 551 void OnGetRenderedTextCompleted(const std::string& text); |
| 555 | 552 |
| 556 // Send updated vsync parameters to the renderer. | 553 // Send updated vsync parameters to the renderer. |
| 557 void SendVSyncParametersToRenderer(); | 554 void SendVSyncParametersToRenderer(); |
| 558 | 555 |
| 559 // Dispatches a TTS session. | |
| 560 void SpeakText(const std::string& text); | |
| 561 | |
| 562 // The associated view. This is weak and is inserted into the view hierarchy | 556 // The associated view. This is weak and is inserted into the view hierarchy |
| 563 // to own this RenderWidgetHostViewMac object. Set to nil at the start of the | 557 // to own this RenderWidgetHostViewMac object. Set to nil at the start of the |
| 564 // destructor. | 558 // destructor. |
| 565 RenderWidgetHostViewCocoa* cocoa_view_; | 559 RenderWidgetHostViewCocoa* cocoa_view_; |
| 566 | 560 |
| 567 // Indicates if the page is loading. | 561 // Indicates if the page is loading. |
| 568 bool is_loading_; | 562 bool is_loading_; |
| 569 | 563 |
| 570 // Whether it's allowed to pause waiting for a new frame. | 564 // Whether it's allowed to pause waiting for a new frame. |
| 571 bool allow_pause_for_resize_or_repaint_; | 565 bool allow_pause_for_resize_or_repaint_; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 | 611 |
| 618 // Factory used to safely scope delayed calls to ShutdownHost(). | 612 // Factory used to safely scope delayed calls to ShutdownHost(). |
| 619 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; | 613 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; |
| 620 | 614 |
| 621 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); | 615 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); |
| 622 }; | 616 }; |
| 623 | 617 |
| 624 } // namespace content | 618 } // namespace content |
| 625 | 619 |
| 626 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 620 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
| OLD | NEW |