OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_RENDERER_RENDER_FRAME_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
12 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
13 #include "base/id_map.h" | 13 #include "base/id_map.h" |
14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
15 #include "base/observer_list.h" | 15 #include "base/observer_list.h" |
16 #include "base/process/process_handle.h" | 16 #include "base/process/process_handle.h" |
| 17 #include "content/public/common/javascript_message_type.h" |
17 #include "content/public/common/referrer.h" | 18 #include "content/public/common/referrer.h" |
18 #include "content/public/renderer/render_frame.h" | 19 #include "content/public/renderer/render_frame.h" |
19 #include "content/renderer/renderer_webcookiejar_impl.h" | 20 #include "content/renderer/renderer_webcookiejar_impl.h" |
20 #include "ipc/ipc_message.h" | 21 #include "ipc/ipc_message.h" |
21 #include "third_party/WebKit/public/web/WebDataSource.h" | 22 #include "third_party/WebKit/public/web/WebDataSource.h" |
22 #include "third_party/WebKit/public/web/WebFrameClient.h" | 23 #include "third_party/WebKit/public/web/WebFrameClient.h" |
23 #include "third_party/WebKit/public/web/WebHistoryCommitType.h" | 24 #include "third_party/WebKit/public/web/WebHistoryCommitType.h" |
24 #include "ui/gfx/range/range.h" | 25 #include "ui/gfx/range/range.h" |
25 | 26 |
26 class TransportDIB; | 27 class TransportDIB; |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 const blink::WebURLError& error); | 276 const blink::WebURLError& error); |
276 virtual void didFinishLoad(blink::WebLocalFrame* frame); | 277 virtual void didFinishLoad(blink::WebLocalFrame* frame); |
277 virtual void didNavigateWithinPage(blink::WebLocalFrame* frame, | 278 virtual void didNavigateWithinPage(blink::WebLocalFrame* frame, |
278 const blink::WebHistoryItem& item, | 279 const blink::WebHistoryItem& item, |
279 blink::WebHistoryCommitType commit_type); | 280 blink::WebHistoryCommitType commit_type); |
280 // DEPRECATED | 281 // DEPRECATED |
281 virtual void didNavigateWithinPage(blink::WebLocalFrame* frame, | 282 virtual void didNavigateWithinPage(blink::WebLocalFrame* frame, |
282 bool is_new_navigation); | 283 bool is_new_navigation); |
283 virtual void didUpdateCurrentHistoryItem(blink::WebLocalFrame* frame); | 284 virtual void didUpdateCurrentHistoryItem(blink::WebLocalFrame* frame); |
284 virtual void didChangeSelection(bool is_empty_selection); | 285 virtual void didChangeSelection(bool is_empty_selection); |
| 286 virtual void runModalAlertDialog(const blink::WebString& message); |
| 287 virtual bool runModalConfirmDialog(const blink::WebString& message); |
| 288 virtual bool runModalPromptDialog(const blink::WebString& message, |
| 289 const blink::WebString& default_value, |
| 290 blink::WebString* actual_value); |
| 291 virtual bool runModalBeforeUnloadDialog(bool is_reload, |
| 292 const blink::WebString& message); |
285 virtual void showContextMenu(const blink::WebContextMenuData& data); | 293 virtual void showContextMenu(const blink::WebContextMenuData& data); |
286 virtual void clearContextMenu(); | 294 virtual void clearContextMenu(); |
287 virtual void willRequestAfterPreconnect(blink::WebLocalFrame* frame, | 295 virtual void willRequestAfterPreconnect(blink::WebLocalFrame* frame, |
288 blink::WebURLRequest& request); | 296 blink::WebURLRequest& request); |
289 virtual void willSendRequest(blink::WebLocalFrame* frame, | 297 virtual void willSendRequest(blink::WebLocalFrame* frame, |
290 unsigned identifier, | 298 unsigned identifier, |
291 blink::WebURLRequest& request, | 299 blink::WebURLRequest& request, |
292 const blink::WebURLResponse& redirect_response); | 300 const blink::WebURLResponse& redirect_response); |
293 virtual void didReceiveResponse(blink::WebLocalFrame* frame, | 301 virtual void didReceiveResponse(blink::WebLocalFrame* frame, |
294 unsigned identifier, | 302 unsigned identifier, |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 void SyncSelectionIfRequired(); | 446 void SyncSelectionIfRequired(); |
439 | 447 |
440 // Returns whether |params.selection_text| should be synchronized to the | 448 // Returns whether |params.selection_text| should be synchronized to the |
441 // browser before bringing up the context menu. Static for testing. | 449 // browser before bringing up the context menu. Static for testing. |
442 static bool ShouldUpdateSelectionTextFromContextMenuParams( | 450 static bool ShouldUpdateSelectionTextFromContextMenuParams( |
443 const base::string16& selection_text, | 451 const base::string16& selection_text, |
444 size_t selection_text_offset, | 452 size_t selection_text_offset, |
445 const gfx::Range& selection_range, | 453 const gfx::Range& selection_range, |
446 const ContextMenuParams& params); | 454 const ContextMenuParams& params); |
447 | 455 |
| 456 bool RunJavaScriptMessage(JavaScriptMessageType type, |
| 457 const base::string16& message, |
| 458 const base::string16& default_value, |
| 459 const GURL& frame_url, |
| 460 base::string16* result); |
| 461 |
448 // Stores the WebLocalFrame we are associated with. | 462 // Stores the WebLocalFrame we are associated with. |
449 blink::WebLocalFrame* frame_; | 463 blink::WebLocalFrame* frame_; |
450 | 464 |
451 base::WeakPtr<RenderViewImpl> render_view_; | 465 base::WeakPtr<RenderViewImpl> render_view_; |
452 int routing_id_; | 466 int routing_id_; |
453 bool is_loading_; | 467 bool is_loading_; |
454 bool is_swapped_out_; | 468 bool is_swapped_out_; |
455 bool is_detaching_; | 469 bool is_detaching_; |
456 | 470 |
457 #if defined(ENABLE_PLUGINS) | 471 #if defined(ENABLE_PLUGINS) |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 // Used to inform didChangeSelection() when it is called in the context | 511 // Used to inform didChangeSelection() when it is called in the context |
498 // of handling a InputMsg_SelectRange IPC. | 512 // of handling a InputMsg_SelectRange IPC. |
499 bool handling_select_range_; | 513 bool handling_select_range_; |
500 | 514 |
501 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); | 515 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); |
502 }; | 516 }; |
503 | 517 |
504 } // namespace content | 518 } // namespace content |
505 | 519 |
506 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 520 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
OLD | NEW |