OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <deque> | 9 #include <deque> |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "app/surface/transport_dib.h" | 13 #include "app/surface/transport_dib.h" |
14 #include "base/gtest_prod_util.h" | 14 #include "base/gtest_prod_util.h" |
15 #include "base/scoped_ptr.h" | 15 #include "base/scoped_ptr.h" |
16 #include "base/string16.h" | 16 #include "base/string16.h" |
17 #include "base/timer.h" | 17 #include "base/timer.h" |
18 #include "chrome/common/edit_command.h" | 18 #include "chrome/common/edit_command.h" |
19 #include "chrome/common/native_web_keyboard_event.h" | 19 #include "chrome/common/native_web_keyboard_event.h" |
20 #include "chrome/common/property_bag.h" | 20 #include "chrome/common/property_bag.h" |
21 #include "gfx/native_widget_types.h" | 21 #include "gfx/native_widget_types.h" |
| 22 #include "gfx/rect.h" |
22 #include "gfx/size.h" | 23 #include "gfx/size.h" |
23 #include "ipc/ipc_channel.h" | 24 #include "ipc/ipc_channel.h" |
24 #include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h" | 25 #include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h" |
25 #include "third_party/WebKit/WebKit/chromium/public/WebTextDirection.h" | 26 #include "third_party/WebKit/WebKit/chromium/public/WebTextDirection.h" |
26 #include "third_party/WebKit/WebKit/chromium/public/WebTextInputType.h" | 27 #include "third_party/WebKit/WebKit/chromium/public/WebTextInputType.h" |
27 | 28 |
28 namespace gfx { | 29 namespace gfx { |
29 class Rect; | 30 class Rect; |
30 } | 31 } |
31 | 32 |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 // * when insertText of NSTextInput is called (on Mac). | 361 // * when insertText of NSTextInput is called (on Mac). |
361 void ImeConfirmComposition(const string16& text); | 362 void ImeConfirmComposition(const string16& text); |
362 | 363 |
363 // Finishes an ongoing composition with the composition text set by last | 364 // Finishes an ongoing composition with the composition text set by last |
364 // SetComposition() call. | 365 // SetComposition() call. |
365 void ImeConfirmComposition(); | 366 void ImeConfirmComposition(); |
366 | 367 |
367 // Cancels an ongoing composition. | 368 // Cancels an ongoing composition. |
368 void ImeCancelComposition(); | 369 void ImeCancelComposition(); |
369 | 370 |
370 // This is for derived classes to give us access to the resizer rect. | |
371 // And to also expose it to the RenderWidgetHostView. | |
372 virtual gfx::Rect GetRootWindowResizerRect() const; | |
373 | |
374 // Makes an IPC call to toggle the spelling panel. | 371 // Makes an IPC call to toggle the spelling panel. |
375 void ToggleSpellPanel(bool is_currently_visible); | 372 void ToggleSpellPanel(bool is_currently_visible); |
376 | 373 |
377 // Makes an IPC call to tell webkit to replace the currently selected word | 374 // Makes an IPC call to tell webkit to replace the currently selected word |
378 // or a word around the cursor. | 375 // or a word around the cursor. |
379 void Replace(const string16& word); | 376 void Replace(const string16& word); |
380 | 377 |
381 // Makes an IPC call to tell webkit to advance to the next misspelling. | 378 // Makes an IPC call to tell webkit to advance to the next misspelling. |
382 void AdvanceToNextMisspelling(); | 379 void AdvanceToNextMisspelling(); |
383 | 380 |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 | 583 |
587 // Set if we are waiting for a repaint ack for the view. | 584 // Set if we are waiting for a repaint ack for the view. |
588 bool repaint_ack_pending_; | 585 bool repaint_ack_pending_; |
589 | 586 |
590 // True when waiting for RESIZE_ACK. | 587 // True when waiting for RESIZE_ACK. |
591 bool resize_ack_pending_; | 588 bool resize_ack_pending_; |
592 | 589 |
593 // The current size of the RenderWidget. | 590 // The current size of the RenderWidget. |
594 gfx::Size current_size_; | 591 gfx::Size current_size_; |
595 | 592 |
| 593 // The current reserved area of the RenderWidget where contents should not be |
| 594 // rendered to draw the resize corner, sidebar mini tabs etc. |
| 595 gfx::Rect current_reserved_rect_; |
| 596 |
596 // The size we last sent as requested size to the renderer. |current_size_| | 597 // The size we last sent as requested size to the renderer. |current_size_| |
597 // is only updated once the resize message has been ack'd. This on the other | 598 // is only updated once the resize message has been ack'd. This on the other |
598 // hand is updated when the resize message is sent. This is very similar to | 599 // hand is updated when the resize message is sent. This is very similar to |
599 // |resize_ack_pending_|, but the latter is not set if the new size has width | 600 // |resize_ack_pending_|, but the latter is not set if the new size has width |
600 // or height zero, which is why we need this too. | 601 // or height zero, which is why we need this too. |
601 gfx::Size in_flight_size_; | 602 gfx::Size in_flight_size_; |
602 | 603 |
| 604 // The reserved area we last sent to the renderer. |current_reserved_rect_| |
| 605 // is only updated once the resize message has been ack'd. This on the other |
| 606 // hand is updated when the resize message is sent. |
| 607 gfx::Rect in_flight_reserved_rect_; |
| 608 |
603 // True if a mouse move event was sent to the render view and we are waiting | 609 // True if a mouse move event was sent to the render view and we are waiting |
604 // for a corresponding ViewHostMsg_HandleInputEvent_ACK message. | 610 // for a corresponding ViewHostMsg_HandleInputEvent_ACK message. |
605 bool mouse_move_pending_; | 611 bool mouse_move_pending_; |
606 | 612 |
607 // The next mouse move event to send (only non-null while mouse_move_pending_ | 613 // The next mouse move event to send (only non-null while mouse_move_pending_ |
608 // is true). | 614 // is true). |
609 scoped_ptr<WebKit::WebMouseEvent> next_mouse_move_; | 615 scoped_ptr<WebKit::WebMouseEvent> next_mouse_move_; |
610 | 616 |
611 // (Similar to |mouse_move_pending_|.) True if a mouse wheel event was sent | 617 // (Similar to |mouse_move_pending_|.) True if a mouse wheel event was sent |
612 // and we are waiting for a corresponding ack. | 618 // and we are waiting for a corresponding ack. |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
690 // changed. | 696 // changed. |
691 bool suppress_next_char_events_; | 697 bool suppress_next_char_events_; |
692 | 698 |
693 // Optional video YUV layer for used for out-of-process compositing. | 699 // Optional video YUV layer for used for out-of-process compositing. |
694 scoped_ptr<VideoLayer> video_layer_; | 700 scoped_ptr<VideoLayer> video_layer_; |
695 | 701 |
696 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost); | 702 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost); |
697 }; | 703 }; |
698 | 704 |
699 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ | 705 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ |
OLD | NEW |