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

Side by Side Diff: content/public/browser/browser_plugin_guest_delegate.h

Issue 69913002: Add UMA for <webview> APIs: a. ClearData, b. when Permission request is allowed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refine by permission granularity. Created 7 years, 1 month 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
OLDNEW
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_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_ 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "base/process/kill.h" 9 #include "base/process/kill.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // value between 0.0 (nothing loaded) and 1.0 (page loaded completely). 59 // value between 0.0 (nothing loaded) and 1.0 (page loaded completely).
60 virtual void LoadProgressed(double progress) {} 60 virtual void LoadProgressed(double progress) {}
61 61
62 // Notification that the guest is no longer hung. 62 // Notification that the guest is no longer hung.
63 virtual void RendererResponsive() {} 63 virtual void RendererResponsive() {}
64 64
65 // Notification that the guest is hung. 65 // Notification that the guest is hung.
66 virtual void RendererUnresponsive() {} 66 virtual void RendererUnresponsive() {}
67 67
68 typedef base::Callback<void(bool /* allow */, 68 typedef base::Callback<void(bool /* allow */,
69 const std::string& /* user_input */)> 69 const std::string& /* user_input */,
70 bool /* user_initiated */)>
70 PermissionResponseCallback; 71 PermissionResponseCallback;
71 72
72 // Request permission from the delegate to perform an action of the provided 73 // Request permission from the delegate to perform an action of the provided
73 // |permission_type|. Details of the permission request are found in 74 // |permission_type|. Details of the permission request are found in
74 // |request_info|. A |callback| is provided to make the decision. 75 // |request_info|. A |callback| is provided to make the decision.
75 // Returns whether the delegate has, or will handle the permission request. 76 // Returns whether the delegate has, or will handle the permission request.
76 virtual bool RequestPermission( 77 virtual bool RequestPermission(
77 BrowserPluginPermissionType permission_type, 78 BrowserPluginPermissionType permission_type,
78 const base::DictionaryValue& request_info, 79 const base::DictionaryValue& request_info,
79 const PermissionResponseCallback& callback, 80 const PermissionResponseCallback& callback,
80 bool allowed_by_default); 81 bool allowed_by_default);
81 82
82 // Requests resolution of a potentially relative URL. 83 // Requests resolution of a potentially relative URL.
83 virtual GURL ResolveURL(const std::string& src); 84 virtual GURL ResolveURL(const std::string& src);
84 85
85 // Notifies that the content size of the guest has changed in autosize mode. 86 // Notifies that the content size of the guest has changed in autosize mode.
86 virtual void SizeChanged(const gfx::Size& old_size, 87 virtual void SizeChanged(const gfx::Size& old_size,
87 const gfx::Size& new_size) {} 88 const gfx::Size& new_size) {}
88 }; 89 };
89 90
90 } // namespace content 91 } // namespace content
91 92
92 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_ 93 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698