| 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 bool IsSurfaceAvailableForCopy() const override; | 260 bool IsSurfaceAvailableForCopy() const override; |
| 261 void Show() override; | 261 void Show() override; |
| 262 void Hide() override; | 262 void Hide() override; |
| 263 bool IsShowing() override; | 263 bool IsShowing() override; |
| 264 void WasUnOccluded() override; | 264 void WasUnOccluded() override; |
| 265 void WasOccluded() override; | 265 void WasOccluded() override; |
| 266 gfx::Rect GetViewBounds() const override; | 266 gfx::Rect GetViewBounds() const override; |
| 267 void SetShowingContextMenu(bool showing) override; | 267 void SetShowingContextMenu(bool showing) override; |
| 268 void SetActive(bool active) override; | 268 void SetActive(bool active) override; |
| 269 void ShowDefinitionForSelection() override; | 269 void ShowDefinitionForSelection() override; |
| 270 bool SupportsSpeech() const override; | |
| 271 void SpeakSelection() override; | 270 void SpeakSelection() override; |
| 272 bool IsSpeaking() const override; | |
| 273 void StopSpeaking() override; | |
| 274 void SetBackgroundColor(SkColor color) override; | 271 void SetBackgroundColor(SkColor color) override; |
| 275 void SetNeedsBeginFrames(bool needs_begin_frames) override; | 272 void SetNeedsBeginFrames(bool needs_begin_frames) override; |
| 276 | 273 |
| 277 // Implementation of RenderWidgetHostViewBase. | 274 // Implementation of RenderWidgetHostViewBase. |
| 278 void InitAsPopup(RenderWidgetHostView* parent_host_view, | 275 void InitAsPopup(RenderWidgetHostView* parent_host_view, |
| 279 const gfx::Rect& pos) override; | 276 const gfx::Rect& pos) override; |
| 280 void InitAsFullscreen(RenderWidgetHostView* reference_host_view) override; | 277 void InitAsFullscreen(RenderWidgetHostView* reference_host_view) override; |
| 281 void Focus() override; | 278 void Focus() override; |
| 282 void UpdateCursor(const WebCursor& cursor) override; | 279 void UpdateCursor(const WebCursor& cursor) override; |
| 283 void SetIsLoading(bool is_loading) override; | 280 void SetIsLoading(bool is_loading) override; |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 // Shuts down the render_widget_host_. This is a separate function so we can | 480 // Shuts down the render_widget_host_. This is a separate function so we can |
| 484 // invoke it from the message loop. | 481 // invoke it from the message loop. |
| 485 void ShutdownHost(); | 482 void ShutdownHost(); |
| 486 | 483 |
| 487 // IPC message handlers. | 484 // IPC message handlers. |
| 488 void OnGetRenderedTextCompleted(const std::string& text); | 485 void OnGetRenderedTextCompleted(const std::string& text); |
| 489 | 486 |
| 490 // Send updated vsync parameters to the top level display. | 487 // Send updated vsync parameters to the top level display. |
| 491 void UpdateDisplayVSyncParameters(); | 488 void UpdateDisplayVSyncParameters(); |
| 492 | 489 |
| 493 // Dispatches a TTS session. | |
| 494 void SpeakText(const std::string& text); | |
| 495 | |
| 496 // Get the focused view that should be used for retrieving the text selection. | 490 // Get the focused view that should be used for retrieving the text selection. |
| 497 RenderWidgetHostViewBase* GetFocusedViewForTextSelection(); | 491 RenderWidgetHostViewBase* GetFocusedViewForTextSelection(); |
| 498 | 492 |
| 499 // Adds/Removes frame observer based on state. | 493 // Adds/Removes frame observer based on state. |
| 500 void UpdateNeedsBeginFramesInternal(); | 494 void UpdateNeedsBeginFramesInternal(); |
| 501 | 495 |
| 502 // The associated view. This is weak and is inserted into the view hierarchy | 496 // The associated view. This is weak and is inserted into the view hierarchy |
| 503 // to own this RenderWidgetHostViewMac object. Set to nil at the start of the | 497 // to own this RenderWidgetHostViewMac object. Set to nil at the start of the |
| 504 // destructor. | 498 // destructor. |
| 505 RenderWidgetHostViewCocoa* cocoa_view_; | 499 RenderWidgetHostViewCocoa* cocoa_view_; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 | 546 |
| 553 // Factory used to safely scope delayed calls to ShutdownHost(). | 547 // Factory used to safely scope delayed calls to ShutdownHost(). |
| 554 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; | 548 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; |
| 555 | 549 |
| 556 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); | 550 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); |
| 557 }; | 551 }; |
| 558 | 552 |
| 559 } // namespace content | 553 } // namespace content |
| 560 | 554 |
| 561 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 555 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
| OLD | NEW |