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

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: works now 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 result->SetInteger(keys::kWindowIdKey, 192 result->SetInteger(keys::kWindowIdKey,
193 ExtensionTabUtil::GetWindowIdOfTab(contents)); 193 ExtensionTabUtil::GetWindowIdOfTab(contents));
194 result->SetString(keys::kUrlKey, contents->GetURL().spec()); 194 result->SetString(keys::kUrlKey, contents->GetURL().spec());
195 result->SetString(keys::kStatusKey, GetTabStatusText(contents->is_loading())); 195 result->SetString(keys::kStatusKey, GetTabStatusText(contents->is_loading()));
196 result->SetBoolean(keys::kSelectedKey, 196 result->SetBoolean(keys::kSelectedKey,
197 tab_strip && tab_index == tab_strip->active_index()); 197 tab_strip && tab_index == tab_strip->active_index());
198 result->SetBoolean(keys::kPinnedKey, 198 result->SetBoolean(keys::kPinnedKey,
199 tab_strip && tab_strip->IsTabPinned(tab_index)); 199 tab_strip && tab_strip->IsTabPinned(tab_index));
200 result->SetString(keys::kTitleKey, contents->GetTitle()); 200 result->SetString(keys::kTitleKey, contents->GetTitle());
201 result->SetBoolean(keys::kIncognitoKey, 201 result->SetBoolean(keys::kIncognitoKey,
202 contents->profile()->IsOffTheRecord()); 202 contents->context()->IsOffTheRecord());
203 203
204 if (!contents->is_loading()) { 204 if (!contents->is_loading()) {
205 NavigationEntry* entry = contents->controller().GetActiveEntry(); 205 NavigationEntry* entry = contents->controller().GetActiveEntry();
206 if (entry) { 206 if (entry) {
207 if (entry->favicon().is_valid()) 207 if (entry->favicon().is_valid())
208 result->SetString(keys::kFaviconUrlKey, entry->favicon().url().spec()); 208 result->SetString(keys::kFaviconUrlKey, entry->favicon().url().spec());
209 } 209 }
210 } 210 }
211 211
212 return result; 212 return result;
(...skipping 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after
1375 // called for every API call the extension made. 1375 // called for every API call the extension made.
1376 GotLanguage(language); 1376 GotLanguage(language);
1377 } 1377 }
1378 1378
1379 void DetectTabLanguageFunction::GotLanguage(const std::string& language) { 1379 void DetectTabLanguageFunction::GotLanguage(const std::string& language) {
1380 result_.reset(Value::CreateStringValue(language.c_str())); 1380 result_.reset(Value::CreateStringValue(language.c_str()));
1381 SendResponse(true); 1381 SendResponse(true);
1382 1382
1383 Release(); // Balanced in Run() 1383 Release(); // Balanced in Run()
1384 } 1384 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698