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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 void WasOccluded() override; | 269 void WasOccluded() override; |
270 gfx::Rect GetViewBounds() const override; | 270 gfx::Rect GetViewBounds() const override; |
271 void SetShowingContextMenu(bool showing) override; | 271 void SetShowingContextMenu(bool showing) override; |
272 void SetActive(bool active) override; | 272 void SetActive(bool active) override; |
273 void ShowDefinitionForSelection() override; | 273 void ShowDefinitionForSelection() override; |
274 bool SupportsSpeech() const override; | 274 bool SupportsSpeech() const override; |
275 void SpeakSelection() override; | 275 void SpeakSelection() override; |
276 bool IsSpeaking() const override; | 276 bool IsSpeaking() const override; |
277 void StopSpeaking() override; | 277 void StopSpeaking() override; |
278 void SetBackgroundColor(SkColor color) override; | 278 void SetBackgroundColor(SkColor color) override; |
| 279 void SetNeedsBeginFrames(bool needs_begin_frames) override; |
279 | 280 |
280 // Implementation of RenderWidgetHostViewBase. | 281 // Implementation of RenderWidgetHostViewBase. |
281 void InitAsPopup(RenderWidgetHostView* parent_host_view, | 282 void InitAsPopup(RenderWidgetHostView* parent_host_view, |
282 const gfx::Rect& pos) override; | 283 const gfx::Rect& pos) override; |
283 void InitAsFullscreen(RenderWidgetHostView* reference_host_view) override; | 284 void InitAsFullscreen(RenderWidgetHostView* reference_host_view) override; |
284 void Focus() override; | 285 void Focus() override; |
285 void UpdateCursor(const WebCursor& cursor) override; | 286 void UpdateCursor(const WebCursor& cursor) override; |
286 void SetIsLoading(bool is_loading) override; | 287 void SetIsLoading(bool is_loading) override; |
287 void RenderProcessGone(base::TerminationStatus status, | 288 void RenderProcessGone(base::TerminationStatus status, |
288 int error_code) override; | 289 int error_code) override; |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 | 363 |
363 // display::DisplayObserver implementation. | 364 // display::DisplayObserver implementation. |
364 void OnDisplayAdded(const display::Display& new_display) override; | 365 void OnDisplayAdded(const display::Display& new_display) override; |
365 void OnDisplayRemoved(const display::Display& old_display) override; | 366 void OnDisplayRemoved(const display::Display& old_display) override; |
366 void OnDisplayMetricsChanged(const display::Display& display, | 367 void OnDisplayMetricsChanged(const display::Display& display, |
367 uint32_t metrics) override; | 368 uint32_t metrics) override; |
368 | 369 |
369 // Forwards the mouse event to the renderer. | 370 // Forwards the mouse event to the renderer. |
370 void ForwardMouseEvent(const blink::WebMouseEvent& event); | 371 void ForwardMouseEvent(const blink::WebMouseEvent& event); |
371 | 372 |
372 // Called when RenderWidget wants to start BeginFrame scheduling or stop. | |
373 void OnSetNeedsBeginFrames(bool needs_begin_frames); | |
374 | |
375 void KillSelf(); | 373 void KillSelf(); |
376 | 374 |
377 void SetTextInputActive(bool active); | 375 void SetTextInputActive(bool active); |
378 | 376 |
379 const std::string& selected_text() const { return selected_text_; } | 377 const std::string& selected_text() const { return selected_text_; } |
380 const gfx::Range& composition_range() const { return composition_range_; } | 378 const gfx::Range& composition_range() const { return composition_range_; } |
381 const base::string16& selection_text() const { return selection_text_; } | 379 const base::string16& selection_text() const { return selection_text_; } |
382 size_t selection_text_offset() const { return selection_text_offset_; } | 380 size_t selection_text_offset() const { return selection_text_offset_; } |
383 | 381 |
384 // Returns true and stores first rectangle for character range if the | 382 // Returns true and stores first rectangle for character range if the |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 | 550 |
553 // Factory used to safely scope delayed calls to ShutdownHost(). | 551 // Factory used to safely scope delayed calls to ShutdownHost(). |
554 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; | 552 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; |
555 | 553 |
556 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); | 554 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); |
557 }; | 555 }; |
558 | 556 |
559 } // namespace content | 557 } // namespace content |
560 | 558 |
561 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 559 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
OLD | NEW |