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_RENDERER_RENDER_VIEW_H_ | 5 #ifndef CHROME_RENDERER_RENDER_VIEW_H_ |
6 #define CHROME_RENDERER_RENDER_VIEW_H_ | 6 #define CHROME_RENDERER_RENDER_VIEW_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <queue> | 9 #include <queue> |
10 #include <vector> | 10 #include <vector> |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 void SendExtensionRequest(const std::string& name, const std::string& args, | 376 void SendExtensionRequest(const std::string& name, const std::string& args, |
377 int callback_id, WebFrame* web_frame); | 377 int callback_id, WebFrame* web_frame); |
378 void OnExtensionResponse(int callback_id, const std::string& response); | 378 void OnExtensionResponse(int callback_id, const std::string& response); |
379 | 379 |
380 protected: | 380 protected: |
381 // RenderWidget override. | 381 // RenderWidget override. |
382 virtual void OnResize(const gfx::Size& new_size, | 382 virtual void OnResize(const gfx::Size& new_size, |
383 const gfx::Rect& resizer_rect); | 383 const gfx::Rect& resizer_rect); |
384 | 384 |
385 private: | 385 private: |
| 386 // For unit tests. |
| 387 friend class RenderViewTest; |
386 FRIEND_TEST(RenderViewTest, OnLoadAlternateHTMLText); | 388 FRIEND_TEST(RenderViewTest, OnLoadAlternateHTMLText); |
387 FRIEND_TEST(RenderViewTest, OnNavStateChanged); | 389 FRIEND_TEST(RenderViewTest, OnNavStateChanged); |
388 FRIEND_TEST(RenderViewTest, OnImeStateChanged); | 390 FRIEND_TEST(RenderViewTest, OnImeStateChanged); |
389 FRIEND_TEST(RenderViewTest, ImeComposition); | 391 FRIEND_TEST(RenderViewTest, ImeComposition); |
390 FRIEND_TEST(RenderViewTest, OnSetTextDirection); | 392 FRIEND_TEST(RenderViewTest, OnSetTextDirection); |
391 FRIEND_TEST(RenderViewTest, OnPrintPages); | 393 FRIEND_TEST(RenderViewTest, OnPrintPages); |
392 FRIEND_TEST(RenderViewTest, OnHandleKeyboardEvent); | 394 FRIEND_TEST(RenderViewTest, OnHandleKeyboardEvent); |
| 395 FRIEND_TEST(RenderViewTest, InsertCharacters); |
393 | 396 |
394 explicit RenderView(RenderThreadBase* render_thread); | 397 explicit RenderView(RenderThreadBase* render_thread); |
395 | 398 |
396 // Initializes this view with the given parent and ID. The |routing_id| can be | 399 // Initializes this view with the given parent and ID. The |routing_id| can be |
397 // set to 'MSG_ROUTING_NONE' if the true ID is not yet known. In this case, | 400 // set to 'MSG_ROUTING_NONE' if the true ID is not yet known. In this case, |
398 // CompleteInit must be called later with the true ID. | 401 // CompleteInit must be called later with the true ID. |
399 void Init(gfx::NativeViewId parent, | 402 void Init(gfx::NativeViewId parent, |
400 base::WaitableEvent* modal_dialog_event, // takes ownership | 403 base::WaitableEvent* modal_dialog_event, // takes ownership |
401 int32 opener_id, | 404 int32 opener_id, |
402 const WebPreferences& webkit_prefs, | 405 const WebPreferences& webkit_prefs, |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
787 scoped_refptr<AudioMessageFilter> audio_message_filter_; | 790 scoped_refptr<AudioMessageFilter> audio_message_filter_; |
788 | 791 |
789 // The currently selected text. This is currently only updated on Linux, where | 792 // The currently selected text. This is currently only updated on Linux, where |
790 // it's for the selection clipboard. | 793 // it's for the selection clipboard. |
791 std::string selection_text_; | 794 std::string selection_text_; |
792 | 795 |
793 DISALLOW_COPY_AND_ASSIGN(RenderView); | 796 DISALLOW_COPY_AND_ASSIGN(RenderView); |
794 }; | 797 }; |
795 | 798 |
796 #endif // CHROME_RENDERER_RENDER_VIEW_H_ | 799 #endif // CHROME_RENDERER_RENDER_VIEW_H_ |
OLD | NEW |