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

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

Issue 1410313006: Separate RenderViewHost from RenderWidgetHost, part 5: move calls to the RenderWidgetHostDelegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no functionality change Created 5 years, 1 month 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_IMPL_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 // (on Windows); 340 // (on Windows);
341 // * when it receives a "commit" signal of GtkIMContext (on Linux); 341 // * when it receives a "commit" signal of GtkIMContext (on Linux);
342 // * when insertText of NSTextInput is called (on Mac). 342 // * when insertText of NSTextInput is called (on Mac).
343 void ImeConfirmComposition(const base::string16& text, 343 void ImeConfirmComposition(const base::string16& text,
344 const gfx::Range& replacement_range, 344 const gfx::Range& replacement_range,
345 bool keep_selection); 345 bool keep_selection);
346 346
347 // Cancels an ongoing composition. 347 // Cancels an ongoing composition.
348 void ImeCancelComposition(); 348 void ImeCancelComposition();
349 349
350 // This is for derived classes to give us access to the resizer rect.
351 // And to also expose it to the RenderWidgetHostView.
352 virtual gfx::Rect GetRootWindowResizerRect() const;
353
354 bool ignore_input_events() const { 350 bool ignore_input_events() const {
355 return ignore_input_events_; 351 return ignore_input_events_;
356 } 352 }
357 353
358 // Whether forwarded WebInputEvents should be ignored. True if either 354 // Whether forwarded WebInputEvents should be ignored. True if either
359 // |ignore_input_events_| or |process_->IgnoreInputEvents()| is true. 355 // |ignore_input_events_| or |process_->IgnoreInputEvents()| is true.
360 bool IgnoreInputEvents() const; 356 bool IgnoreInputEvents() const;
361 357
362 bool has_touch_handler() const { return has_touch_handler_; } 358 bool has_touch_handler() const { return has_touch_handler_; }
363 359
364 // Notification that the user has made some kind of input that could
365 // perform an action. See OnUserGesture for more details.
366 void StartUserGesture();
367
368 // Set the RenderView background transparency. 360 // Set the RenderView background transparency.
369 void SetBackgroundOpaque(bool opaque); 361 void SetBackgroundOpaque(bool opaque);
370 362
371 // Notifies the renderer that the next key event is bound to one or more 363 // Notifies the renderer that the next key event is bound to one or more
372 // pre-defined edit commands 364 // pre-defined edit commands
373 void SetEditCommandsForNextKeyEvent( 365 void SetEditCommandsForNextKeyEvent(
374 const std::vector<EditCommand>& commands); 366 const std::vector<EditCommand>& commands);
375 367
376 // Executes the edit command on the RenderView. 368 // Executes the edit command on the RenderView.
377 void ExecuteEditCommand(const std::string& command, 369 void ExecuteEditCommand(const std::string& command,
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 // This is used for various IPC messages, including plugins. 505 // This is used for various IPC messages, including plugins.
514 gfx::NativeViewId GetNativeViewId() const; 506 gfx::NativeViewId GetNativeViewId() const;
515 507
516 // --------------------------------------------------------------------------- 508 // ---------------------------------------------------------------------------
517 // The following methods are overridden by RenderViewHost to send upwards to 509 // The following methods are overridden by RenderViewHost to send upwards to
518 // its delegate. 510 // its delegate.
519 511
520 // Called when a mousewheel event was not processed by the renderer. 512 // Called when a mousewheel event was not processed by the renderer.
521 virtual void UnhandledWheelEvent(const blink::WebMouseWheelEvent& event) {} 513 virtual void UnhandledWheelEvent(const blink::WebMouseWheelEvent& event) {}
522 514
523 // Notification that the user has made some kind of input that could
524 // perform an action. The gestures that count are 1) any mouse down
525 // event and 2) enter or space key presses.
526 virtual void OnUserGesture() {}
527
528 // Callbacks for notification when the renderer becomes unresponsive to user
529 // input events, and subsequently responsive again.
530 virtual void NotifyRendererUnresponsive() {}
531 virtual void NotifyRendererResponsive() {}
532
533 // Callback for notification that we failed to receive any rendered graphics 515 // Callback for notification that we failed to receive any rendered graphics
534 // from a newly loaded page. Used for testing. 516 // from a newly loaded page. Used for testing.
535 virtual void NotifyNewContentRenderingTimeoutForTesting() {} 517 virtual void NotifyNewContentRenderingTimeoutForTesting() {}
536 518
537 // Called when auto-resize resulted in the renderer size changing.
538 virtual void OnRenderAutoResized(const gfx::Size& new_size) {}
539
540 // --------------------------------------------------------------------------- 519 // ---------------------------------------------------------------------------
541 520
542 // RenderViewHost overrides this method to impose further restrictions on when
543 // to allow mouse lock.
544 // Once the request is approved or rejected, GotResponseToLockMouseRequest()
545 // will be called.
546 virtual void RequestToLockMouse(bool user_gesture,
547 bool last_unlocked_by_target);
548
549 bool IsMouseLocked() const; 521 bool IsMouseLocked() const;
550 522
551 // RenderViewHost overrides this method to report whether tab-initiated 523 // RenderViewHost overrides this method to report whether tab-initiated
552 // fullscreen was granted. 524 // fullscreen was granted.
553 virtual bool IsFullscreenGranted() const; 525 virtual bool IsFullscreenGranted() const;
554 526
555 virtual blink::WebDisplayMode GetDisplayMode() const; 527 virtual blink::WebDisplayMode GetDisplayMode() const;
556 528
557 // The View associated with the RenderViewHost. The lifetime of this object 529 // The View associated with the RenderViewHost. The lifetime of this object
558 // is associated with the lifetime of the Render process. If the Renderer 530 // is associated with the lifetime of the Render process. If the Renderer
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 base::TimeDelta new_content_rendering_delay_; 826 base::TimeDelta new_content_rendering_delay_;
855 827
856 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; 828 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_;
857 829
858 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 830 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
859 }; 831 };
860 832
861 } // namespace content 833 } // namespace content
862 834
863 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 835 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698