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

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

Issue 8253002: Move PageTransition into content namespace. While I'm touching all these files, I've also updated... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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_context_menu_model.h" 5 #include "chrome/browser/extensions/extension_context_menu_model.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/extensions/extension_tab_util.h" 9 #include "chrome/browser/extensions/extension_tab_util.h"
10 #include "chrome/browser/prefs/pref_service.h" 10 #include "chrome/browser/prefs/pref_service.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 } 104 }
105 105
106 void ExtensionContextMenuModel::ExecuteCommand(int command_id) { 106 void ExtensionContextMenuModel::ExecuteCommand(int command_id) {
107 const Extension* extension = GetExtension(); 107 const Extension* extension = GetExtension();
108 if (!extension) 108 if (!extension)
109 return; 109 return;
110 110
111 switch (command_id) { 111 switch (command_id) {
112 case NAME: { 112 case NAME: {
113 browser_->OpenURL(extension->GetHomepageURL(), GURL(), 113 browser_->OpenURL(extension->GetHomepageURL(), GURL(),
114 NEW_FOREGROUND_TAB, PageTransition::LINK); 114 NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK);
115 break; 115 break;
116 } 116 }
117 case CONFIGURE: 117 case CONFIGURE:
118 DCHECK(!extension->options_url().is_empty()); 118 DCHECK(!extension->options_url().is_empty());
119 profile_->GetExtensionProcessManager()->OpenOptionsPage(extension, 119 profile_->GetExtensionProcessManager()->OpenOptionsPage(extension,
120 browser_); 120 browser_);
121 break; 121 break;
122 case HIDE: { 122 case HIDE: {
123 ExtensionService* extension_service = profile_->GetExtensionService(); 123 ExtensionService* extension_service = profile_->GetExtensionService();
124 extension_service->SetBrowserActionVisibility(extension, false); 124 extension_service->SetBrowserActionVisibility(extension, false);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 } 159 }
160 160
161 void ExtensionContextMenuModel::ExtensionUninstallCanceled() { 161 void ExtensionContextMenuModel::ExtensionUninstallCanceled() {
162 Release(); 162 Release();
163 } 163 }
164 164
165 const Extension* ExtensionContextMenuModel::GetExtension() const { 165 const Extension* ExtensionContextMenuModel::GetExtension() const {
166 ExtensionService* extension_service = profile_->GetExtensionService(); 166 ExtensionService* extension_service = profile_->GetExtensionService();
167 return extension_service->GetExtensionById(extension_id_, false); 167 return extension_service->GetExtensionById(extension_id_, false);
168 } 168 }
OLDNEW
« no previous file with comments | « chrome/browser/download/download_request_limiter.cc ('k') | chrome/browser/extensions/extension_history_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698