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

Side by Side Diff: chrome/browser/tab_contents/render_view_host_delegate_helper.cc

Issue 5168004: Revert 66646 - Add "open as window" menu item to NTP app menu.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 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 | « chrome/browser/sessions/session_restore.cc ('k') | chrome/browser/tab_contents/tab_contents.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/tab_contents/render_view_host_delegate_helper.h" 5 #include "chrome/browser/tab_contents/render_view_host_delegate_helper.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/background_contents_service.h" 10 #include "chrome/browser/background_contents_service.h"
(...skipping 21 matching lines...) Expand all
32 32
33 BackgroundContents* 33 BackgroundContents*
34 RenderViewHostDelegateViewHelper::MaybeCreateBackgroundContents( 34 RenderViewHostDelegateViewHelper::MaybeCreateBackgroundContents(
35 int route_id, 35 int route_id,
36 Profile* profile, 36 Profile* profile,
37 SiteInstance* site, 37 SiteInstance* site,
38 const GURL& opener_url, 38 const GURL& opener_url,
39 const string16& frame_name) { 39 const string16& frame_name) {
40 ExtensionsService* extensions_service = profile->GetExtensionsService(); 40 ExtensionsService* extensions_service = profile->GetExtensionsService();
41 41
42 if (!opener_url.is_valid() || frame_name.empty()) 42 if (!opener_url.is_valid() ||
43 frame_name.empty() ||
44 !extensions_service ||
45 !extensions_service->is_ready())
43 return NULL; 46 return NULL;
44 47
45 const Extension* extension = 48 const Extension* extension =
46 extensions_service->GetExtensionByURL(opener_url); 49 extensions_service->GetExtensionByURL(opener_url);
47 if (!extension) 50 if (!extension)
48 extension = extensions_service->GetExtensionByWebExtent(opener_url); 51 extension = extensions_service->GetExtensionByWebExtent(opener_url);
49 if (!extension || 52 if (!extension ||
50 !extension->HasApiPermission(Extension::kBackgroundPermission)) 53 !extension->HasApiPermission(Extension::kBackgroundPermission))
51 return NULL; 54 return NULL;
52 55
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 inspector_settings->SetWithoutPathExpansion(key, 327 inspector_settings->SetWithoutPathExpansion(key,
325 Value::CreateStringValue(value)); 328 Value::CreateStringValue(value));
326 } 329 }
327 330
328 void RenderViewHostDelegateHelper::ClearInspectorSettings(Profile* profile) { 331 void RenderViewHostDelegateHelper::ClearInspectorSettings(Profile* profile) {
329 DictionaryValue* inspector_settings = 332 DictionaryValue* inspector_settings =
330 profile->GetPrefs()->GetMutableDictionary( 333 profile->GetPrefs()->GetMutableDictionary(
331 prefs::kWebKitInspectorSettings); 334 prefs::kWebKitInspectorSettings);
332 inspector_settings->Clear(); 335 inspector_settings->Clear();
333 } 336 }
OLDNEW
« no previous file with comments | « chrome/browser/sessions/session_restore.cc ('k') | chrome/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698