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

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

Issue 7743004: Move extension/webstore-related URL getters to the extension_urls namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review feedback. 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/extensions/extension_updater.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 #include "chrome/browser/extensions/extension_tab_helper.h" 5 #include "chrome/browser/extensions/extension_tab_helper.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/sessions/restore_tab_helper.h" 10 #include "chrome/browser/sessions/restore_tab_helper.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 void ExtensionTabHelper::OnInlineWebstoreInstall( 150 void ExtensionTabHelper::OnInlineWebstoreInstall(
151 const std::string& webstore_item_id) { 151 const std::string& webstore_item_id) {
152 if (!CommandLine::ForCurrentProcess()->HasSwitch( 152 if (!CommandLine::ForCurrentProcess()->HasSwitch(
153 switches::kEnableInlineWebstoreInstall)) { 153 switches::kEnableInlineWebstoreInstall)) {
154 return; 154 return;
155 } 155 }
156 156
157 // For now there is no inline installation UI, we just open the item's Web 157 // For now there is no inline installation UI, we just open the item's Web
158 // Store page in a new tab. 158 // Store page in a new tab.
159 GURL webstore_item_url = 159 GURL webstore_item_url =
160 GURL(extension_misc::GetWebstoreItemDetailURLPrefix() + webstore_item_id); 160 GURL(extension_urls::GetWebstoreItemDetailURLPrefix() + webstore_item_id);
161 GetBrowser()->OpenURL(OpenURLParams( 161 GetBrowser()->OpenURL(OpenURLParams(
162 webstore_item_url, 162 webstore_item_url,
163 GetBrowser()->GetSelectedTabContents()->GetURL(), 163 GetBrowser()->GetSelectedTabContents()->GetURL(),
164 NEW_FOREGROUND_TAB, 164 NEW_FOREGROUND_TAB,
165 PageTransition::AUTO_BOOKMARK)); 165 PageTransition::AUTO_BOOKMARK));
166 } 166 }
167 167
168 void ExtensionTabHelper::OnRequest( 168 void ExtensionTabHelper::OnRequest(
169 const ExtensionHostMsg_Request_Params& request) { 169 const ExtensionHostMsg_Request_Params& request) {
170 extension_function_dispatcher_.Dispatch(request, 170 extension_function_dispatcher_.Dispatch(request,
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 if (tab_contents_delegate) 228 if (tab_contents_delegate)
229 return tab_contents_delegate->GetFrameNativeWindow(); 229 return tab_contents_delegate->GetFrameNativeWindow();
230 else 230 else
231 return NULL; 231 return NULL;
232 } 232 }
233 233
234 gfx::NativeView ExtensionTabHelper::GetNativeViewOfHost() { 234 gfx::NativeView ExtensionTabHelper::GetNativeViewOfHost() {
235 RenderWidgetHostView* rwhv = tab_contents()->GetRenderWidgetHostView(); 235 RenderWidgetHostView* rwhv = tab_contents()->GetRenderWidgetHostView();
236 return rwhv ? rwhv->GetNativeView() : NULL; 236 return rwhv ? rwhv->GetNativeView() : NULL;
237 } 237 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698