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

Side by Side Diff: chrome/browser/component_updater/pepper_flash_component_installer.cc

Issue 10905227: Introduce PPB_Flash_Font. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 3 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/chrome_renderer.gypi » ('j') | ppapi/api/private/ppb_flash_font.idl » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/component_updater/flash_component_installer.h" 5 #include "chrome/browser/component_updater/flash_component_installer.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 12 matching lines...) Expand all
23 #include "build/build_config.h" 23 #include "build/build_config.h"
24 #include "chrome/browser/component_updater/component_updater_service.h" 24 #include "chrome/browser/component_updater/component_updater_service.h"
25 #include "chrome/browser/plugin_prefs.h" 25 #include "chrome/browser/plugin_prefs.h"
26 #include "chrome/common/pepper_flash.h" 26 #include "chrome/common/pepper_flash.h"
27 #include "chrome/common/chrome_constants.h" 27 #include "chrome/common/chrome_constants.h"
28 #include "chrome/common/chrome_paths.h" 28 #include "chrome/common/chrome_paths.h"
29 #include "chrome/common/pepper_flash.h" 29 #include "chrome/common/pepper_flash.h"
30 #include "content/public/browser/browser_thread.h" 30 #include "content/public/browser/browser_thread.h"
31 #include "content/public/browser/plugin_service.h" 31 #include "content/public/browser/plugin_service.h"
32 #include "content/public/common/pepper_plugin_info.h" 32 #include "content/public/common/pepper_plugin_info.h"
33 #include "ppapi/c/private/ppb_flash_font.h"
33 #include "ppapi/c/private/ppb_pdf.h" 34 #include "ppapi/c/private/ppb_pdf.h"
34 #include "webkit/plugins/plugin_constants.h" 35 #include "webkit/plugins/plugin_constants.h"
35 #include "webkit/plugins/ppapi/plugin_module.h" 36 #include "webkit/plugins/ppapi/plugin_module.h"
36 37
37 #include "flapper_version.h" // In SHARED_INTERMEDIATE_DIR. 38 #include "flapper_version.h" // In SHARED_INTERMEDIATE_DIR.
38 39
39 using content::BrowserThread; 40 using content::BrowserThread;
40 using content::PluginService; 41 using content::PluginService;
41 42
42 namespace { 43 namespace {
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 } 119 }
119 } 120 }
120 return found; 121 return found;
121 } 122 }
122 123
123 // Returns true if the Pepper |interface_name| is implemented by this browser. 124 // Returns true if the Pepper |interface_name| is implemented by this browser.
124 // It does not check if the interface is proxied. 125 // It does not check if the interface is proxied.
125 bool SupportsPepperInterface(const char* interface_name) { 126 bool SupportsPepperInterface(const char* interface_name) {
126 if (webkit::ppapi::PluginModule::SupportsInterface(interface_name)) 127 if (webkit::ppapi::PluginModule::SupportsInterface(interface_name))
127 return true; 128 return true;
128 // The PDF interface is invisible to SupportsInterface() on the browser 129 // These interfaces are invisible to SupportsInterface() on the browser
129 // process because it is provided using PpapiInterfaceFactoryManager. We need 130 // process because they are provided using PpapiInterfaceFactoryManager.
130 // to check for that as well. 131 // We need to check for them as well.
131 // TODO(cpu): make this more sane. 132 // TODO(cpu): make this more sane.
132 return (strcmp(interface_name, PPB_PDF_INTERFACE) == 0); 133 return (strcmp(interface_name, PPB_FLASH_FONT_INTERFACE_0_1) == 0 ||
134 strcmp(interface_name, PPB_PDF_INTERFACE) == 0);
133 } 135 }
134 136
135 bool MakePepperFlashPluginInfo(const FilePath& flash_path, 137 bool MakePepperFlashPluginInfo(const FilePath& flash_path,
136 const Version& flash_version, 138 const Version& flash_version,
137 bool out_of_process, 139 bool out_of_process,
138 content::PepperPluginInfo* plugin_info) { 140 content::PepperPluginInfo* plugin_info) {
139 if (!flash_version.IsValid()) 141 if (!flash_version.IsValid())
140 return false; 142 return false;
141 const std::vector<uint16> ver_nums = flash_version.components(); 143 const std::vector<uint16> ver_nums = flash_version.components();
142 if (ver_nums.size() < 3) 144 if (ver_nums.size() < 3)
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 } 368 }
367 369
368 } // namespace 370 } // namespace
369 371
370 void RegisterPepperFlashComponent(ComponentUpdateService* cus) { 372 void RegisterPepperFlashComponent(ComponentUpdateService* cus) {
371 #if defined(GOOGLE_CHROME_BUILD) 373 #if defined(GOOGLE_CHROME_BUILD)
372 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, 374 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
373 base::Bind(&StartPepperFlashUpdateRegistration, cus)); 375 base::Bind(&StartPepperFlashUpdateRegistration, cus));
374 #endif 376 #endif
375 } 377 }
OLDNEW
« no previous file with comments | « no previous file | chrome/chrome_renderer.gypi » ('j') | ppapi/api/private/ppb_flash_font.idl » ('J')

Powered by Google App Engine
This is Rietveld 408576698