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

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

Issue 160084: Chaos geolocation demo, non-WebKit part. Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 4 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/chrome_client_impl.cc ('k') | webkit/glue/webworker_impl.cc » ('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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-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 // WebCore provides hooks for several kinds of functionality, allowing separate 5 // WebCore provides hooks for several kinds of functionality, allowing separate
6 // classes termed "delegates" to receive notifications (in the form of direct 6 // classes termed "delegates" to receive notifications (in the form of direct
7 // function calls) when certain events are about to occur or have just occurred. 7 // function calls) when certain events are about to occur or have just occurred.
8 // In some cases, the delegate implements the needed functionality; in others, 8 // In some cases, the delegate implements the needed functionality; in others,
9 // the delegate has some control over the behavior but doesn't actually 9 // the delegate has some control over the behavior but doesn't actually
10 // implement it. For example, the UI delegate is responsible for showing a 10 // implement it. For example, the UI delegate is responsible for showing a
(...skipping 16 matching lines...) Expand all
27 #define WEBKIT_GLUE_WEBVIEW_DELEGATE_H_ 27 #define WEBKIT_GLUE_WEBVIEW_DELEGATE_H_
28 28
29 #include <vector> 29 #include <vector>
30 30
31 #include "base/gfx/native_widget_types.h" 31 #include "base/gfx/native_widget_types.h"
32 #include "webkit/api/public/WebFrame.h" 32 #include "webkit/api/public/WebFrame.h"
33 #include "webkit/api/public/WebNavigationPolicy.h" 33 #include "webkit/api/public/WebNavigationPolicy.h"
34 #include "webkit/api/public/WebNavigationType.h" 34 #include "webkit/api/public/WebNavigationType.h"
35 #include "webkit/api/public/WebTextDirection.h" 35 #include "webkit/api/public/WebTextDirection.h"
36 #include "webkit/api/public/WebWidgetClient.h" 36 #include "webkit/api/public/WebWidgetClient.h"
37 #include "webkit/chaos/GeolocationPowerbox.h"
37 #include "webkit/glue/context_menu.h" 38 #include "webkit/glue/context_menu.h"
38 39
39 namespace webkit_glue { 40 namespace webkit_glue {
40 class WebMediaPlayerDelegate; 41 class WebMediaPlayerDelegate;
41 } 42 }
42 43
43 namespace WebCore { 44 namespace WebCore {
44 class AccessibilityObject; 45 class AccessibilityObject;
46 class KURL;
45 } 47 }
46 48
47 namespace WebKit { 49 namespace WebKit {
48 class WebDataSource; 50 class WebDataSource;
49 class WebDragData; 51 class WebDragData;
50 class WebForm; 52 class WebForm;
51 class WebWorker; 53 class WebWorker;
52 class WebWorkerClient; 54 class WebWorkerClient;
53 class WebMediaPlayer; 55 class WebMediaPlayer;
54 class WebMediaPlayerClient; 56 class WebMediaPlayerClient;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 class WebFileChooserCallback { 94 class WebFileChooserCallback {
93 public: 95 public:
94 WebFileChooserCallback() {} 96 WebFileChooserCallback() {}
95 virtual ~WebFileChooserCallback() {} 97 virtual ~WebFileChooserCallback() {}
96 virtual void OnFileChoose(const std::vector<FilePath>& file_names) { } 98 virtual void OnFileChoose(const std::vector<FilePath>& file_names) { }
97 99
98 private: 100 private:
99 DISALLOW_COPY_AND_ASSIGN(WebFileChooserCallback); 101 DISALLOW_COPY_AND_ASSIGN(WebFileChooserCallback);
100 }; 102 };
101 103
104 class ChooseGeolocationProviderCallback {
105 public:
106 ChooseGeolocationProviderCallback() {}
107 virtual ~ChooseGeolocationProviderCallback() {}
108 virtual void OnProviderChosen(
109 WebCore::GeolocationPowerbox::ProviderId provider_id) = 0;
110
111 private:
112 DISALLOW_COPY_AND_ASSIGN(ChooseGeolocationProviderCallback);
113 };
102 114
103 // Inheritance here is somewhat weird, but since a WebView is a WebWidget, 115 // Inheritance here is somewhat weird, but since a WebView is a WebWidget,
104 // it makes sense that a WebViewDelegate is a WebWidgetClient. 116 // it makes sense that a WebViewDelegate is a WebWidgetClient.
105 class WebViewDelegate : virtual public WebKit::WebWidgetClient { 117 class WebViewDelegate : virtual public WebKit::WebWidgetClient {
106 public: 118 public:
107 // WebView additions ------------------------------------------------------- 119 // WebView additions -------------------------------------------------------
108 120
109 // This method is called to create a new WebView. The WebView should not be 121 // This method is called to create a new WebView. The WebView should not be
110 // made visible until the new WebView's Delegate has its Show method called. 122 // made visible until the new WebView's Delegate has its Show method called.
111 // The returned WebView pointer is assumed to be owned by the host window, 123 // The returned WebView pointer is assumed to be owned by the host window,
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 // populated with the given initial_filename string. The WebViewDelegate 626 // populated with the given initial_filename string. The WebViewDelegate
615 // will own the WebFileChooserCallback object and is responsible for 627 // will own the WebFileChooserCallback object and is responsible for
616 // freeing it. 628 // freeing it.
617 virtual void RunFileChooser(bool multi_select, 629 virtual void RunFileChooser(bool multi_select,
618 const string16& title, 630 const string16& title,
619 const FilePath& initial_filename, 631 const FilePath& initial_filename,
620 WebFileChooserCallback* file_chooser) { 632 WebFileChooserCallback* file_chooser) {
621 delete file_chooser; 633 delete file_chooser;
622 } 634 }
623 635
636 virtual void chooseGeolocationProvider(
637 ChooseGeolocationProviderCallback *geolocation_provider_callback,
638 const WebCore::KURL &url) = 0;
639
624 // @abstract Shows a context menu with commands relevant to a specific 640 // @abstract Shows a context menu with commands relevant to a specific
625 // element on the current page. 641 // element on the current page.
626 // @param webview The WebView sending the delegate method. 642 // @param webview The WebView sending the delegate method.
627 // @param node_type The type of the node(s) the context menu is being 643 // @param node_type The type of the node(s) the context menu is being
628 // invoked on 644 // invoked on
629 // @param x The x position of the mouse pointer (relative to the webview) 645 // @param x The x position of the mouse pointer (relative to the webview)
630 // @param y The y position of the mouse pointer (relative to the webview) 646 // @param y The y position of the mouse pointer (relative to the webview)
631 // @param link_url The absolute URL of the link that contains the node the 647 // @param link_url The absolute URL of the link that contains the node the
632 // mouse right clicked on 648 // mouse right clicked on
633 // @param image_url The absolute URL of the image that the mouse right 649 // @param image_url The absolute URL of the image that the mouse right
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 // Called when an item was added to the history 860 // Called when an item was added to the history
845 virtual void DidAddHistoryItem() { } 861 virtual void DidAddHistoryItem() { }
846 862
847 WebViewDelegate() { } 863 WebViewDelegate() { }
848 864
849 protected: 865 protected:
850 ~WebViewDelegate() { } 866 ~WebViewDelegate() { }
851 }; 867 };
852 868
853 #endif // WEBKIT_GLUE_WEBVIEW_DELEGATE_H_ 869 #endif // WEBKIT_GLUE_WEBVIEW_DELEGATE_H_
OLDNEW
« no previous file with comments | « webkit/glue/chrome_client_impl.cc ('k') | webkit/glue/webworker_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698