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

Side by Side Diff: webkit/glue/webview.h

Issue 246060: Revert 27705 - Move various methods from glue/webview.h to api/public/WebView... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 2 months 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 | Annotate | Revision Log
« no previous file with comments | « webkit/glue/webpreferences.cc ('k') | webkit/glue/webview_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 WEBKIT_GLUE_WEBVIEW_H_ 5 #ifndef WEBKIT_GLUE_WEBVIEW_H_
6 #define WEBKIT_GLUE_WEBVIEW_H_ 6 #define WEBKIT_GLUE_WEBVIEW_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 public: 49 public:
50 WebView() {} 50 WebView() {}
51 virtual ~WebView() {} 51 virtual ~WebView() {}
52 52
53 // This method creates a WebView that is NOT yet initialized. You will need 53 // This method creates a WebView that is NOT yet initialized. You will need
54 // to call InitializeMainFrame to finish the initialization. You may pass 54 // to call InitializeMainFrame to finish the initialization. You may pass
55 // NULL for the editing_client parameter if you are not interested in those 55 // NULL for the editing_client parameter if you are not interested in those
56 // notifications. 56 // notifications.
57 static WebView* Create(WebViewDelegate* delegate); 57 static WebView* Create(WebViewDelegate* delegate);
58 58
59 // After creating a WebView, you should immediately call this function. You
60 // can optionally modify the settings (via GetSettings()) in between. The
61 // frame_client will receive events for the main frame and any child frames.
62 virtual void InitializeMainFrame(WebKit::WebFrameClient* frame_client) = 0;
63
59 // Tells all Page instances of this view to update the visited link state for 64 // Tells all Page instances of this view to update the visited link state for
60 // the specified hash. 65 // the specified hash.
61 static void UpdateVisitedLinkState(uint64 link_hash); 66 static void UpdateVisitedLinkState(uint64 link_hash);
62 67
63 // Tells all Page instances of this view to update visited state for all their 68 // Tells all Page instances of this view to update visited state for all their
64 // links. 69 // links.
65 static void ResetVisitedLinkState(); 70 static void ResetVisitedLinkState();
66 71
67 // Returns the delegate for this WebView. This is the pointer that was 72 // Returns the delegate for this WebView. This is the pointer that was
68 // passed to WebView::Initialize. The caller must check this value before 73 // passed to WebView::Initialize. The caller must check this value before
69 // using it, it will be NULL during closing of the view. 74 // using it, it will be NULL during closing of the view.
70 virtual WebViewDelegate* GetDelegate() = 0; 75 virtual WebViewDelegate* GetDelegate() = 0;
71 76
77 // Method that controls whether pressing Tab key cycles through page elements
78 // or inserts a '\t' char in text area
79 virtual void SetTabKeyCyclesThroughElements(bool value) = 0;
80
81 // Returns the frame previous to the specified frame, by traversing the frame
82 // tree, wrapping around if necessary.
83 virtual WebKit::WebFrame* GetPreviousFrameBefore(WebKit::WebFrame* frame, bool wrap) = 0;
84
85 // Returns the frame after to the specified frame, by traversing the frame
86 // tree, wrapping around if necessary.
87 virtual WebKit::WebFrame* GetNextFrameAfter(WebKit::WebFrame* frame, bool wrap ) = 0;
88
89 // ---- TODO(darin): remove from here ----
90
91 //
92 // - (IBAction)stopLoading:(id)sender;
93 virtual void StopLoading() = 0;
94
95 // Sets the maximum size to allow WebCore's internal B/F list to grow to.
96 // If not called, the list will have the default capacity specified in
97 // BackForwardList.cpp.
98 virtual void SetBackForwardListSize(int size) = 0;
99
100 // ---- TODO(darin): remove to here ----
101
72 // Settings used by inspector. 102 // Settings used by inspector.
73 virtual const std::wstring& GetInspectorSettings() const = 0; 103 virtual const std::wstring& GetInspectorSettings() const = 0;
74 virtual void SetInspectorSettings(const std::wstring& settings) = 0; 104 virtual void SetInspectorSettings(const std::wstring& settings) = 0;
75 105
106 // Show the JavaScript console.
107 virtual void ShowJavaScriptConsole() = 0;
108
109 // Helper method for drag and drop target operations: override the default
110 // drop effect with either a "copy" (accept true) or "none" (accept false)
111 // effect. Return true on success.
112 virtual bool SetDropEffect(bool accept) = 0;
113
76 // Notifies the webview that autofill suggestions are available for a node. 114 // Notifies the webview that autofill suggestions are available for a node.
77 virtual void AutofillSuggestionsForNode( 115 virtual void AutofillSuggestionsForNode(
78 int64 node_id, 116 int64 node_id,
79 const std::vector<std::wstring>& suggestions, 117 const std::vector<std::wstring>& suggestions,
80 int default_suggestion_index) = 0; 118 int default_suggestion_index) = 0;
81 119
82 // Hides the autofill popup if any are showing. 120 // Hides the autofill popup if any are showing.
83 virtual void HideAutofillPopup() = 0; 121 virtual void HideAutofillPopup() = 0;
84 122
85 // Returns development tools agent instance belonging to this view. 123 // Returns development tools agent instance belonging to this view.
86 virtual WebDevToolsAgent* GetWebDevToolsAgent() = 0; 124 virtual WebDevToolsAgent* GetWebDevToolsAgent() = 0;
87 125
126 // Makes the webview transparent. Useful if you want to have some custom
127 // background behind it.
128 virtual void SetIsTransparent(bool is_transparent) = 0;
129 virtual bool GetIsTransparent() const = 0;
130
88 virtual void SetSpellingPanelVisibility(bool is_visible) = 0; 131 virtual void SetSpellingPanelVisibility(bool is_visible) = 0;
89 virtual bool GetSpellingPanelVisibility() = 0; 132 virtual bool GetSpellingPanelVisibility() = 0;
90 133
134 virtual void SetTabsToLinks(bool enable) = 0;
135 virtual bool GetTabsToLinks() const = 0;
136
91 // Performs an action from a context menu for the node at the given 137 // Performs an action from a context menu for the node at the given
92 // location. 138 // location.
93 virtual void MediaPlayerActionAt(int x, 139 virtual void MediaPlayerActionAt(int x,
94 int y, 140 int y,
95 const MediaPlayerAction& action) = 0; 141 const MediaPlayerAction& action) = 0;
96 142
143 // Updates the WebView's active state (i.e., control tints).
144 virtual void SetActive(bool active) = 0;
145
146 // Gets the WebView's active state (i.e., state of control tints).
147 virtual bool IsActive() = 0;
148
97 private: 149 private:
98 DISALLOW_COPY_AND_ASSIGN(WebView); 150 DISALLOW_COPY_AND_ASSIGN(WebView);
99 }; 151 };
100 152
101 #endif // WEBKIT_GLUE_WEBVIEW_H_ 153 #endif // WEBKIT_GLUE_WEBVIEW_H_
OLDNEW
« no previous file with comments | « webkit/glue/webpreferences.cc ('k') | webkit/glue/webview_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698