| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef WEBKIT_GLUE_WEBVIEW_H_ | |
| 6 #define WEBKIT_GLUE_WEBVIEW_H_ | |
| 7 | |
| 8 #include "base/basictypes.h" | |
| 9 #include "webkit/api/public/WebView.h" | |
| 10 | |
| 11 class WebViewDelegate; | |
| 12 | |
| 13 // | |
| 14 // @class WebView | |
| 15 // WebView manages the interaction between WebFrameViews and WebDataSources. | |
| 16 // Modification of the policies and behavior of the WebKit is largely managed | |
| 17 // by WebViews and their delegates. | |
| 18 // | |
| 19 // Typical usage: | |
| 20 // | |
| 21 // WebView *webView; | |
| 22 // WebFrame *mainFrame; | |
| 23 // | |
| 24 // webView = [[WebView alloc] initWithFrame: NSMakeRect (0,0,640,480)]; | |
| 25 // mainFrame = [webView mainFrame]; | |
| 26 // [mainFrame loadRequest:request]; | |
| 27 // | |
| 28 // WebViews have a WebViewDelegate that the embedding application implements | |
| 29 // that are required for tasks like opening new windows and controlling the | |
| 30 // user interface elements in those windows, monitoring the progress of loads, | |
| 31 // monitoring URL changes, and making determinations about how content of | |
| 32 // certain types should be handled. | |
| 33 class WebView : public WebKit::WebView { | |
| 34 public: | |
| 35 WebView() {} | |
| 36 virtual ~WebView() {} | |
| 37 | |
| 38 // This method creates a WebView that is NOT yet initialized. You will need | |
| 39 // to call InitializeMainFrame to finish the initialization. You may pass | |
| 40 // NULL for the editing_client parameter if you are not interested in those | |
| 41 // notifications. | |
| 42 static WebView* Create(WebViewDelegate* delegate); | |
| 43 | |
| 44 // Tells all Page instances of this view to update the visited link state for | |
| 45 // the specified hash. | |
| 46 static void UpdateVisitedLinkState(uint64 link_hash); | |
| 47 | |
| 48 // Tells all Page instances of this view to update visited state for all their | |
| 49 // links. | |
| 50 static void ResetVisitedLinkState(); | |
| 51 | |
| 52 private: | |
| 53 DISALLOW_COPY_AND_ASSIGN(WebView); | |
| 54 }; | |
| 55 | |
| 56 #endif // WEBKIT_GLUE_WEBVIEW_H_ | |
| OLD | NEW |