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

Side by Side Diff: content/browser/renderer_host/render_view_host.cc

Issue 8511075: Move the struct used when showing a desktop notification to content/public/common, so that chrome... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/renderer_host/render_view_host.h" 5 #include "content/browser/renderer_host/render_view_host.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after
1450 } 1450 }
1451 } 1451 }
1452 1452
1453 void RenderViewHost::OnRequestDesktopNotificationPermission( 1453 void RenderViewHost::OnRequestDesktopNotificationPermission(
1454 const GURL& source_origin, int callback_context) { 1454 const GURL& source_origin, int callback_context) {
1455 content::GetContentClient()->browser()->RequestDesktopNotificationPermission( 1455 content::GetContentClient()->browser()->RequestDesktopNotificationPermission(
1456 source_origin, callback_context, process()->id(), routing_id()); 1456 source_origin, callback_context, process()->id(), routing_id());
1457 } 1457 }
1458 1458
1459 void RenderViewHost::OnShowDesktopNotification( 1459 void RenderViewHost::OnShowDesktopNotification(
1460 const DesktopNotificationHostMsg_Show_Params& params) { 1460 const content::ShowDesktopNotificationHostMsgParams& params) {
1461 // Disallow HTML notifications from javascript: and file: schemes as this 1461 // Disallow HTML notifications from javascript: and file: schemes as this
1462 // allows unwanted cross-domain access. 1462 // allows unwanted cross-domain access.
1463 GURL url = params.contents_url; 1463 GURL url = params.contents_url;
1464 if (params.is_html && 1464 if (params.is_html &&
1465 (url.SchemeIs(chrome::kJavaScriptScheme) || 1465 (url.SchemeIs(chrome::kJavaScriptScheme) ||
1466 url.SchemeIs(chrome::kFileScheme))) { 1466 url.SchemeIs(chrome::kFileScheme))) {
1467 return; 1467 return;
1468 } 1468 }
1469 1469
1470 content::GetContentClient()->browser()->ShowDesktopNotification( 1470 content::GetContentClient()->browser()->ShowDesktopNotification(
(...skipping 27 matching lines...) Expand all
1498 1498
1499 void RenderViewHost::OnWebUISend(const GURL& source_url, 1499 void RenderViewHost::OnWebUISend(const GURL& source_url,
1500 const std::string& name, 1500 const std::string& name,
1501 const base::ListValue& args) { 1501 const base::ListValue& args) {
1502 delegate_->WebUISend(this, source_url, name, args); 1502 delegate_->WebUISend(this, source_url, name, args);
1503 } 1503 }
1504 1504
1505 void RenderViewHost::ClearPowerSaveBlockers() { 1505 void RenderViewHost::ClearPowerSaveBlockers() {
1506 STLDeleteValues(&power_save_blockers_); 1506 STLDeleteValues(&power_save_blockers_);
1507 } 1507 }
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host.h ('k') | content/common/desktop_notification_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698