diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-16 05:11:05 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-16 05:11:05 +0000 |
commit | 05158051ea881677c03a22ddf38a3e6779cebb9e (patch) | |
tree | 95c6756227e0bbea55da3c4b19abdf99d7eb3ebe /webkit/glue/webwidget_delegate.h | |
parent | 6c14b76fede6abc592d9d65965fbdf4626e83efe (diff) | |
download | chromium_src-05158051ea881677c03a22ddf38a3e6779cebb9e.zip chromium_src-05158051ea881677c03a22ddf38a3e6779cebb9e.tar.gz chromium_src-05158051ea881677c03a22ddf38a3e6779cebb9e.tar.bz2 |
Use WebWidget from the WebKit API. This change also makes
use of WebKitClient (replacing WebWidgetDelegate from glue).
The ripple effects of this change are rather large, but most
of the impact is mechanical.
The more interesting changes include:
1- Removing the WebWidget parameter from WebWidgetClient methods. This didn't
matter at all to RenderWidget or RenderView, but it did cause some changes to
be made to TestWebViewDelegate. Now, it is not possible to share a delegate
implementation for both the WebView and a popup menu, so I have a second
instance of the delegate owned by TestShell for use with popup menus.
2- Plumbing WebNavigationPolicy in place of WindowOpenDisposition was getting
to be a pretty large change, so I stopped short of deleting WindowOpenDisposition.
That way the Chrome side can remain mostly unmodified. I then added a mapping
function to convert from WebNavigationPolicy to WindowOpenDisposition.
3- The IME methods on WebWidget were renamed (reviewed separately by hbono), and
there is now an enum to specify the composition command (WebCompositionCommand).
4- I added IPC serialization for WebCompositionCommand and WebTextDirection,
which cleaned up some code that was just using ints in IPC messages.
R=jam
BUG=16234
TEST=none
Review URL: http://codereview.chromium.org/149620
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20854 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webwidget_delegate.h')
-rw-r--r-- | webkit/glue/webwidget_delegate.h | 102 |
1 files changed, 0 insertions, 102 deletions
diff --git a/webkit/glue/webwidget_delegate.h b/webkit/glue/webwidget_delegate.h deleted file mode 100644 index a891cb1..0000000 --- a/webkit/glue/webwidget_delegate.h +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef WEBKIT_GLUE_WEBWIDGET_DELEGATE_H__ -#define WEBKIT_GLUE_WEBWIDGET_DELEGATE_H__ - -#include <vector> - -#include "base/string16.h" -#include "webkit/glue/window_open_disposition.h" - -namespace WebKit { -struct WebCursorInfo; -struct WebRect; -struct WebScreenInfo; -} - -class WebWidget; -struct WebPluginGeometry; - -class WebWidgetDelegate { - public: - // Called when a region of the WebWidget needs to be re-painted. - virtual void DidInvalidateRect(WebWidget* webwidget, - const WebKit::WebRect& rect) = 0; - - // Called when a region of the WebWidget, given by clip_rect, should be - // scrolled by the specified dx and dy amounts. - virtual void DidScrollRect(WebWidget* webwidget, int dx, int dy, - const WebKit::WebRect& clip_rect) = 0; - - // This method is called to instruct the window containing the WebWidget to - // show itself as the topmost window. This method is only used after a - // successful call to CreateWebWidget. |disposition| indicates how this new - // window should be displayed, but generally only means something for - // WebViews. - virtual void Show(WebWidget* webwidget, - WindowOpenDisposition disposition) = 0; - - // This method is called to instruct the window containing the WebWidget to - // close. Note: This method should just be the trigger that causes the - // WebWidget to eventually close. It should not actually be destroyed until - // after this call returns. - virtual void CloseWidgetSoon(WebWidget* webwidget) = 0; - - // This method is called to focus the window containing the WebWidget so - // that it receives keyboard events. - virtual void Focus(WebWidget* webwidget) = 0; - - // This method is called to unfocus the window containing the WebWidget so that - // it no longer receives keyboard events. - virtual void Blur(WebWidget* webwidget) = 0; - - virtual void SetCursor(WebWidget* webwidget, - const WebKit::WebCursorInfo& cursor) = 0; - - // Returns the rectangle of the WebWidget in screen coordinates. - virtual void GetWindowRect(WebWidget* webwidget, WebKit::WebRect* rect) = 0; - - // This method is called to re-position the WebWidget on the screen. The given - // rect is in screen coordinates. The implementation may choose to ignore - // this call or modify the given rect. This method may be called before Show - // has been called. - // TODO(darin): this is more of a request; does this need to take effect - // synchronously? - virtual void SetWindowRect(WebWidget* webwidget, - const WebKit::WebRect& rect) = 0; - - // Returns the rectangle of the window in which this WebWidget is embeded. - virtual void GetRootWindowRect(WebWidget* webwidget, - WebKit::WebRect* rect) = 0; - - // Returns the resizer rectangle of the window this WebWidget is in. This - // is used on Mac to determine if a scrollbar is over the in-window resize - // area at the bottom right corner. - virtual void GetRootWindowResizerRect(WebWidget* webwidget, - WebKit::WebRect* rect) = 0; - - // Keeps track of the necessary window move for a plugin window that resulted - // from a scroll operation. That way, all plugin windows can be moved at the - // same time as each other and the page. - virtual void DidMove(WebWidget* webwidget, const WebPluginGeometry& move) = 0; - - // Suppress input events to other windows, and do not return until the widget - // is closed. This is used to support |window.showModalDialog|. - virtual void RunModal(WebWidget* webwidget) = 0; - - // Returns true if the widget is in a background tab. - virtual bool IsHidden(WebWidget* webwidget) = 0; - - // Returns information about the screen associated with this widget. - virtual WebKit::WebScreenInfo GetScreenInfo(WebWidget* webwidget) = 0; - - WebWidgetDelegate() { } - virtual ~WebWidgetDelegate() { } - - private: - DISALLOW_COPY_AND_ASSIGN(WebWidgetDelegate); -}; - -#endif // #ifndef WEBKIT_GLUE_WEBWIDGET_DELEGATE_H__ |