Home | History | Annotate | Download | only in themes

Lines Matching refs:pack

26 // Version number of the current theme pack. We just throw out and rebuild
32 // "header" to be written last. That way we can detect whether the pack was
34 // written (i.e. chrome crashed on a different thread while writing the pack).
83 // IDs when storing to a cached pack.
336 BrowserThemePack* pack = new BrowserThemePack;
337 pack->BuildHeader(extension);
338 pack->BuildTintsFromJSON(extension->GetThemeTints());
339 pack->BuildColorsFromJSON(extension->GetThemeColors());
340 pack->BuildDisplayPropertiesFromJSON(extension->GetThemeDisplayProperties());
344 pack->ParseImageNamesFromJSON(extension->GetThemeImages(),
347 pack->BuildSourceImagesArray(file_paths);
349 if (!pack->LoadRawBitmapsTo(file_paths, &pack->prepared_images_))
352 pack->GenerateFrameImages(&pack->prepared_images_);
357 pack->GenerateTintedButtons(
358 pack->GetTintInternal(ThemeService::TINT_BUTTONS),
359 &pack->prepared_images_);
362 pack->GenerateTabBackgroundImages(&pack->prepared_images_);
365 return pack;
372 scoped_refptr<BrowserThemePack> pack(new BrowserThemePack);
373 pack->data_pack_.reset(new ui::DataPack);
375 if (!pack->data_pack_->Load(path)) {
376 LOG(ERROR) << "Failed to load theme data pack.";
381 if (!pack->data_pack_->GetStringPiece(kHeaderID, &pointer))
383 pack->header_ = reinterpret_cast<BrowserThemePackHeader*>(const_cast<char*>(
386 if (pack->header_->version != kThemePackVersion) {
391 std::string theme_id(reinterpret_cast<char*>(pack->header_->theme_id),
399 if (!pack->data_pack_->GetStringPiece(kTintsID, &pointer))
401 pack->tints_ = reinterpret_cast<TintEntry*>(const_cast<char*>(
404 if (!pack->data_pack_->GetStringPiece(kColorsID, &pointer))
406 pack->colors_ =
409 if (!pack->data_pack_->GetStringPiece(kDisplayPropertiesID, &pointer))
411 pack->display_properties_ = reinterpret_cast<DisplayPropertyPair*>(
414 if (!pack->data_pack_->GetStringPiece(kSourceImagesID, &pointer))
416 pack->source_images_ = reinterpret_cast<int*>(
419 return pack;