Closed GoogleCodeExporter closed 9 years ago
Sounds like you're not using the correct Chromium revision. You should use the
Chromium revision specified in the CHROMIUM_BUILD_COMPATIBILITY.txt file. Your
directory structure should then be as follows:
/path/to/chromium/src/cef <-- either CEF1 or CEF3.
Original comment by magreenb...@gmail.com
on 24 May 2012 at 5:35
oh, ok, I didn't see that :)
I read through the general usage wiki page, and ran the cefclient test app that
was built and the tests ran pretty smoothly. But I'll switch to the chromium
version as you suggested. Thanks for the help!
Original comment by neke...@msn.com
on 24 May 2012 at 5:40
ok, so this time I did as you suggested. I dl-ed the chromium version that was
in the txt file, and began compiling. However this time I ran into way more
problems than before. I still managed to build it, and the cefclient ran fine
as well.
Here are the changes I had to do to build cef.
CHANGES:
src/cef3/libcef/browser/browser_main.cc: line 34
return content::GetContentClient()->GetDataResource(resource_id, ui::SCALE_FACTOR_NONE);
src/cef3/libcef/common/content_client.h: line 45
virtual FilePath GetPathForResourcePack(const FilePath& pack_path,
ui::ScaleFactor scale_factor = ui::SCALE_FACTOR_NONE) OVERRIDE;
virtual base::RefCountedStaticMemory* LoadDataResourceBytes(
int resource_id, ui::ScaleFactor sf = ui::SCALE_FACTOR_NONE) OVERRIDE;
virtual bool GetRawDataResource(int resource_id, ui::ScaleFactor sf,
base::StringPiece* value) OVERRIDE;
virtual base::StringPiece GetDataResource(
int resource_id,
ui::ScaleFactor scale_factor) const OVERRIDE;
Note: I removed the equivalent declarations of this from private and added them
to public, then I added the appropriate parameters, so that it didn't complain
about them not being implemented.
src/cef3/libcef/common/content_client.cc: line 143 (changed the implementations
of the above)
FilePath CefContentClient::GetPathForResourcePack(const FilePath& pack_path,
ui::ScaleFactor scale_factor) {
// Only allow the cef pack file to load.
if (!pack_loading_disabled_ && allow_pack_file_load_)
return pack_path;
return FilePath();
}
line 168:
base::RefCountedStaticMemory* CefContentClient::LoadDataResourceBytes(
int resource_id, ui::ScaleFactor sf) {
return NULL;
}
line 173:
bool CefContentClient::GetRawDataResource(int resource_id, ui::ScaleFactor sf,
base::StringPiece* value) {
if (application_.get()) {
CefRefPtr<CefResourceBundleHandler> handler =
application_->GetResourceBundleHandler();
if (handler.get()) {
void* data = NULL;
size_t data_size = 0;
if (handler->GetDataResource(resource_id, data, data_size))
*value = base::StringPiece(static_cast<char*>(data), data_size);
}
}
return (pack_loading_disabled_ || !value->empty());
}
src/content/public/common/content_client.h: line 119
virtual base::StringPiece GetDataResource(
int resource_id,
ui::ScaleFactor scale_factor = ui::SCALE_FACTOR_NONE) const = 0;
src/cef3/libcef/browser/menu_model_impl.cc: line 77
if (impl_->GetAcceleratorAt(index, key_code, shift_pressed, ctrl_pressed,
alt_pressed)) {
*accelerator = ui::Accelerator(static_cast<ui::KeyboardCode>(key_code),
shift_pressed | ctrl_pressed | alt_pressed);
Note: I'm not really sure if this works...
line 94:
virtual bool GetIconAt(int index, gfx::ImageSkia* icon) OVERRIDE {
src/cef3/libcef/browser/url_request_context_getter.cc: line 324
net::ProxyService::CreateSystemProxyConfigService(0, file_loop_));
Note: this may crash when creating a proxy service...
src/ui/base/resource/resource_bundle.h: line 198
base::StringPiece GetRawDataResource(int resource_id,
ScaleFactor scale_factor = ui::SCALE_FACTOR_NONE) const;
Note: this was needed, because some function calls were made from cef that
didn't use the second parameter.
src/cef3/libcef/browser/content_browser_client.h: line 35
virtual bool ShouldSwapProcessesForRedirect(content::ResourceContext*, const GURL&, const GURL&) OVERRIDE;
virtual content::WebContentsView* OverrideCreateWebContentsView(
content::WebContents* web_contents, content::RenderViewHostDelegateView**) OVERRIDE;
src/cef3/libcef/browser/content_browser_client.cc: line 88
bool
CefContentBrowserClient::ShouldSwapProcessesForRedirect(content::ResourceContext
*, const GURL&, const GURL&)
{
return false;
}
content::WebContentsView*
CefContentBrowserClient::OverrideCreateWebContentsView(
content::WebContents* web_contents, content::RenderViewHostDelegateView**) {
return NULL;
}
Note: this is the implementation of the above.
src/cef3/libcef/common/main_delegate.cc: line 382
pak_file, ui::SCALE_FACTOR_100P);
Original comment by neke...@msn.com
on 25 May 2012 at 1:00
Original issue reported on code.google.com by
neke...@msn.com
on 24 May 2012 at 5:28