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

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

Issue 7464009: Removal of Profile from content part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: browser_context Created 9 years, 5 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
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 "chrome/browser/extensions/extension_tabs_module.h" 5 #include "chrome/browser/extensions/extension_tabs_module.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 result->SetInteger(keys::kWindowIdKey, 193 result->SetInteger(keys::kWindowIdKey,
194 ExtensionTabUtil::GetWindowIdOfTab(contents)); 194 ExtensionTabUtil::GetWindowIdOfTab(contents));
195 result->SetString(keys::kUrlKey, contents->GetURL().spec()); 195 result->SetString(keys::kUrlKey, contents->GetURL().spec());
196 result->SetString(keys::kStatusKey, GetTabStatusText(is_loading)); 196 result->SetString(keys::kStatusKey, GetTabStatusText(is_loading));
197 result->SetBoolean(keys::kSelectedKey, 197 result->SetBoolean(keys::kSelectedKey,
198 tab_strip && tab_index == tab_strip->active_index()); 198 tab_strip && tab_index == tab_strip->active_index());
199 result->SetBoolean(keys::kPinnedKey, 199 result->SetBoolean(keys::kPinnedKey,
200 tab_strip && tab_strip->IsTabPinned(tab_index)); 200 tab_strip && tab_strip->IsTabPinned(tab_index));
201 result->SetString(keys::kTitleKey, contents->GetTitle()); 201 result->SetString(keys::kTitleKey, contents->GetTitle());
202 result->SetBoolean(keys::kIncognitoKey, 202 result->SetBoolean(keys::kIncognitoKey,
203 contents->profile()->IsOffTheRecord()); 203 contents->browser_context()->IsOffTheRecord());
204 204
205 if (!is_loading) { 205 if (!is_loading) {
206 NavigationEntry* entry = contents->controller().GetActiveEntry(); 206 NavigationEntry* entry = contents->controller().GetActiveEntry();
207 if (entry) { 207 if (entry) {
208 if (entry->favicon().is_valid()) 208 if (entry->favicon().is_valid())
209 result->SetString(keys::kFaviconUrlKey, entry->favicon().url().spec()); 209 result->SetString(keys::kFaviconUrlKey, entry->favicon().url().spec());
210 } 210 }
211 } 211 }
212 212
213 return result; 213 return result;
(...skipping 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after
1376 // called for every API call the extension made. 1376 // called for every API call the extension made.
1377 GotLanguage(language); 1377 GotLanguage(language);
1378 } 1378 }
1379 1379
1380 void DetectTabLanguageFunction::GotLanguage(const std::string& language) { 1380 void DetectTabLanguageFunction::GotLanguage(const std::string& language) {
1381 result_.reset(Value::CreateStringValue(language.c_str())); 1381 result_.reset(Value::CreateStringValue(language.c_str()));
1382 SendResponse(true); 1382 SendResponse(true);
1383 1383
1384 Release(); // Balanced in Run() 1384 Release(); // Balanced in Run()
1385 } 1385 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698