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

Side by Side Diff: trunk/src/content/browser/browser_plugin/browser_plugin_guest.cc

Issue 65043018: Revert 235647 "Add UMA for <webview> APIs: a. ClearData, b. when..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « trunk/src/chrome/browser/guestview/webview/webview_guest.cc ('k') | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "content/browser/browser_plugin/browser_plugin_guest.h" 5 #include "content/browser/browser_plugin/browser_plugin_guest.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 } 429 }
430 430
431 int request_id = ++next_permission_request_id_; 431 int request_id = ++next_permission_request_id_;
432 permission_request_map_[request_id] = request; 432 permission_request_map_[request_id] = request;
433 433
434 BrowserPluginGuestDelegate::PermissionResponseCallback callback = 434 BrowserPluginGuestDelegate::PermissionResponseCallback callback =
435 base::Bind(&BrowserPluginGuest::RespondToPermissionRequest, 435 base::Bind(&BrowserPluginGuest::RespondToPermissionRequest,
436 AsWeakPtr(), 436 AsWeakPtr(),
437 request_id); 437 request_id);
438 // If BrowserPluginGuestDelegate hasn't handled the permission then we simply 438 // If BrowserPluginGuestDelegate hasn't handled the permission then we simply
439 // perform the default action (which is one of allow or reject) immediately. 439 // reject it immediately.
440 if (!delegate_->RequestPermission( 440 if (!delegate_->RequestPermission(
441 permission_type, request_info, callback, request->AllowedByDefault())) { 441 permission_type, request_info, callback, request->AllowedByDefault())) {
442 callback.Run(request->AllowedByDefault(), ""); 442 callback.Run(request->AllowedByDefault(), "");
443 return browser_plugin::kInvalidPermissionRequestID; 443 return browser_plugin::kInvalidPermissionRequestID;
444 } 444 }
445 445
446 return request_id; 446 return request_id;
447 } 447 }
448 448
449 BrowserPluginGuest* BrowserPluginGuest::CreateNewGuestWindow( 449 BrowserPluginGuest* BrowserPluginGuest::CreateNewGuestWindow(
(...skipping 1292 matching lines...) Expand 10 before | Expand all | Expand 10 after
1742 request_info.Set(browser_plugin::kRequestMethod, 1742 request_info.Set(browser_plugin::kRequestMethod,
1743 base::Value::CreateStringValue(request_method)); 1743 base::Value::CreateStringValue(request_method));
1744 request_info.Set(browser_plugin::kURL, base::Value::CreateStringValue(url)); 1744 request_info.Set(browser_plugin::kURL, base::Value::CreateStringValue(url));
1745 1745
1746 RequestPermission(BROWSER_PLUGIN_PERMISSION_TYPE_DOWNLOAD, 1746 RequestPermission(BROWSER_PLUGIN_PERMISSION_TYPE_DOWNLOAD,
1747 new DownloadRequest(callback), 1747 new DownloadRequest(callback),
1748 request_info); 1748 request_info);
1749 } 1749 }
1750 1750
1751 } // namespace content 1751 } // namespace content
OLDNEW
« no previous file with comments | « trunk/src/chrome/browser/guestview/webview/webview_guest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698