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

Side by Side Diff: chrome/browser/extensions/extension_webnavigation_api.cc

Issue 7622012: Removal of Profile from content part 8. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 9 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 | « no previous file | chrome/browser/tab_contents/render_view_context_menu.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) 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 // Implements the Chrome Extensions WebNavigation API. 5 // Implements the Chrome Extensions WebNavigation API.
6 6
7 #include "chrome/browser/extensions/extension_webnavigation_api.h" 7 #include "chrome/browser/extensions/extension_webnavigation_api.h"
8 8
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 333
334 ExtensionWebNavigationEventRouter::ExtensionWebNavigationEventRouter( 334 ExtensionWebNavigationEventRouter::ExtensionWebNavigationEventRouter(
335 Profile* profile) : profile_(profile) {} 335 Profile* profile) : profile_(profile) {}
336 336
337 ExtensionWebNavigationEventRouter::~ExtensionWebNavigationEventRouter() {} 337 ExtensionWebNavigationEventRouter::~ExtensionWebNavigationEventRouter() {}
338 338
339 void ExtensionWebNavigationEventRouter::Init() { 339 void ExtensionWebNavigationEventRouter::Init() {
340 if (registrar_.IsEmpty()) { 340 if (registrar_.IsEmpty()) {
341 registrar_.Add(this, 341 registrar_.Add(this,
342 content::NOTIFICATION_RETARGETING, 342 content::NOTIFICATION_RETARGETING,
343 Source<Profile>(profile_)); 343 Source<content::BrowserContext>(profile_));
344 registrar_.Add(this, 344 registrar_.Add(this,
345 content::NOTIFICATION_TAB_ADDED, 345 content::NOTIFICATION_TAB_ADDED,
346 NotificationService::AllSources()); 346 NotificationService::AllSources());
347 registrar_.Add(this, 347 registrar_.Add(this,
348 content::NOTIFICATION_TAB_CONTENTS_DESTROYED, 348 content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
349 NotificationService::AllSources()); 349 NotificationService::AllSources());
350 } 350 }
351 } 351 }
352 352
353 void ExtensionWebNavigationEventRouter::Observe( 353 void ExtensionWebNavigationEventRouter::Observe(
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 DictionaryValue* resultDict = new DictionaryValue(); 624 DictionaryValue* resultDict = new DictionaryValue();
625 resultDict->SetString( 625 resultDict->SetString(
626 keys::kUrlKey, 626 keys::kUrlKey,
627 frame_navigation_state.GetUrl(frame_id).spec()); 627 frame_navigation_state.GetUrl(frame_id).spec());
628 resultDict->SetBoolean( 628 resultDict->SetBoolean(
629 keys::kErrorOccurredKey, 629 keys::kErrorOccurredKey,
630 frame_navigation_state.GetErrorOccurredInFrame(frame_id)); 630 frame_navigation_state.GetErrorOccurredInFrame(frame_id));
631 result_.reset(resultDict); 631 result_.reset(resultDict);
632 return true; 632 return true;
633 } 633 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/tab_contents/render_view_context_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698